growsurf-ruby 0.7.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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +1 -1
  4. data/lib/growsurf_ruby/models/campaign/campaign_reward_list_response.rb +21 -0
  5. data/lib/growsurf_ruby/models/campaign/delete_reward_response.rb +26 -0
  6. data/lib/growsurf_ruby/models/campaign/reward.rb +193 -0
  7. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +212 -0
  8. data/lib/growsurf_ruby/models/campaign/reward_delete_params.rb +4 -4
  9. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +205 -0
  10. data/lib/growsurf_ruby/models/campaign.rb +28 -1
  11. data/lib/growsurf_ruby/models/campaign_create_params.rb +68 -0
  12. data/lib/growsurf_ruby/models/campaign_update_params.rb +63 -0
  13. data/lib/growsurf_ruby/models/reward_tax_valuation.rb +35 -0
  14. data/lib/growsurf_ruby/models.rb +6 -0
  15. data/lib/growsurf_ruby/resources/campaign/design.rb +66 -0
  16. data/lib/growsurf_ruby/resources/campaign/emails.rb +63 -0
  17. data/lib/growsurf_ruby/resources/campaign/installation.rb +65 -0
  18. data/lib/growsurf_ruby/resources/campaign/options.rb +63 -0
  19. data/lib/growsurf_ruby/resources/campaign/rewards.rb +199 -0
  20. data/lib/growsurf_ruby/resources/campaign.rb +112 -0
  21. data/lib/growsurf_ruby/version.rb +1 -1
  22. data/lib/growsurf_ruby.rb +13 -0
  23. data/rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi +41 -0
  24. data/rbi/growsurf_ruby/models/campaign/delete_reward_response.rbi +38 -0
  25. data/rbi/growsurf_ruby/models/campaign/reward.rbi +291 -0
  26. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +358 -0
  27. data/rbi/growsurf_ruby/models/campaign/reward_delete_params.rbi +4 -4
  28. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +309 -0
  29. data/rbi/growsurf_ruby/models/campaign.rbi +42 -3
  30. data/rbi/growsurf_ruby/models/campaign_create_params.rbi +125 -0
  31. data/rbi/growsurf_ruby/models/campaign_update_params.rbi +130 -0
  32. data/rbi/growsurf_ruby/models/reward_tax_valuation.rbi +56 -0
  33. data/rbi/growsurf_ruby/models.rbi +6 -0
  34. data/rbi/growsurf_ruby/resources/campaign/design.rbi +50 -0
  35. data/rbi/growsurf_ruby/resources/campaign/emails.rbi +49 -0
  36. data/rbi/growsurf_ruby/resources/campaign/installation.rbi +50 -0
  37. data/rbi/growsurf_ruby/resources/campaign/options.rbi +49 -0
  38. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +216 -0
  39. data/rbi/growsurf_ruby/resources/campaign.rbi +94 -0
  40. data/sig/growsurf_ruby/models/campaign/campaign_reward_list_response.rbs +18 -0
  41. data/sig/growsurf_ruby/models/campaign/delete_reward_response.rbs +17 -0
  42. data/sig/growsurf_ruby/models/campaign/reward.rbs +146 -0
  43. data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +210 -0
  44. data/sig/growsurf_ruby/models/campaign/reward_delete_params.rbs +4 -4
  45. data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +200 -0
  46. data/sig/growsurf_ruby/models/campaign.rbs +18 -3
  47. data/sig/growsurf_ruby/models/campaign_create_params.rbs +74 -0
  48. data/sig/growsurf_ruby/models/campaign_update_params.rbs +70 -0
  49. data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +19 -0
  50. data/sig/growsurf_ruby/models.rbs +6 -0
  51. data/sig/growsurf_ruby/resources/campaign/design.rbs +20 -0
  52. data/sig/growsurf_ruby/resources/campaign/emails.rbs +20 -0
  53. data/sig/growsurf_ruby/resources/campaign/installation.rbs +20 -0
  54. data/sig/growsurf_ruby/resources/campaign/options.rbs +20 -0
  55. data/sig/growsurf_ruby/resources/campaign/rewards.rbs +74 -0
  56. data/sig/growsurf_ruby/resources/campaign.rbs +34 -0
  57. metadata +41 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be12c4785ae7a40c39c8e74aeeddcc53359c12bdad594d2578b7da9e1bc1b20d
4
- data.tar.gz: cb49bb681ce1bd2291b3468df5b2186f23ea41d0262210a963652934689aa956
3
+ metadata.gz: 3f01d0f2cb2534783b61dc721b1fde1d8f4465951558a08e474a2c0816b55785
4
+ data.tar.gz: bc309ac0246f6ee795ccb48487c37f366c3e04293cdc9f3fea0ef55c8a8576e0
5
5
  SHA512:
6
- metadata.gz: d3b33af554e8fac71c6c3e4df21a5565c188fee651fe4d316f6c0486c0349c460bb737e2a96c852bd8856aa01e469bbf3c65c5314617b5a800423f9558e3fa70
7
- data.tar.gz: db54fe7cfff4279d0af2d57589aa66106a2e0b83ce59c5a37fe6809145cca0edc59a0b3dab2a0a51c93592a1016b55564469ff05a6934ec0973ad206c5f35ffe
6
+ metadata.gz: bf7d990bbf244492889bdb83c07478bee329598a80eaf4bb48a9445fb322fcdd10fa1a7854a19c8f5dee29f4277d7a3a13c557f5329ebada1309ba7f7a299461
7
+ data.tar.gz: 4157fc3ebf661d9a92f4713b9f10d91f1f31f6d298449684c5f01946c85909eb3fbf02aefff7399282d7d9c81f124878543806cc307629752105c7156355c1cc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.0](https://github.com/growsurf/growsurf-ruby/compare/v0.8.0...v1.0.0) (2026-07-03)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * campaign create no longer accepts `options`, and campaign update no longer accepts the design / emails / options / notifications / installation config blobs — edit those via the new config sub-resources. Reward-config CRUD moved from /campaign/{id}/rewards to /campaign/{id}/reward-configs[/{campaignRewardId}].
9
+
10
+ ### Features
11
+
12
+ * add campaign management endpoints; drop deprecated create/update config blobs ([c67a800](https://github.com/growsurf/growsurf-ruby/commit/c67a800670fe56394960e944f301ec068aeb50a9))
13
+
14
+ ## [0.8.0](https://github.com/growsurf/growsurf-ruby/compare/v0.7.0...v0.8.0) (2026-07-01)
15
+
16
+
17
+ ### Features
18
+
19
+ * **api:** add campaign create/update/clone and program-reward CRUD ([aa8d3dd](https://github.com/growsurf/growsurf-ruby/commit/aa8d3ddbf167f26d0807ba58fce2071517afb318))
20
+
3
21
  ## 0.7.0 (2026-06-29)
4
22
 
5
23
  Full Changelog: [v0.6.1...v0.7.0](https://github.com/growsurf/growsurf-ruby/compare/v0.6.1...v0.7.0)
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", "~> 0.7.0"
20
+ gem "growsurf-ruby", "~> 1.0.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Rewards#list
7
+ class CampaignRewardListResponse < GrowsurfRuby::Internal::Type::BaseModel
8
+ # @!attribute rewards
9
+ # The program's active, visible, and enabled rewards.
10
+ #
11
+ # @return [Array<GrowsurfRuby::Models::Campaign::Reward>]
12
+ required :rewards, -> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::Reward] }
13
+
14
+ # @!method initialize(rewards:)
15
+ # The list of a program's configured rewards.
16
+ #
17
+ # @param rewards [Array<GrowsurfRuby::Models::Campaign::Reward>] The program's active, visible, and enabled rewards.
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Rewards#delete
7
+ class DeleteRewardResponse < GrowsurfRuby::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # The deleted reward ID.
10
+ #
11
+ # @return [String]
12
+ required :id, String
13
+
14
+ # @!attribute success
15
+ #
16
+ # @return [Boolean]
17
+ required :success, GrowsurfRuby::Internal::Type::Boolean
18
+
19
+ # @!method initialize(id:, success:)
20
+ # @param id [String] The deleted reward ID.
21
+ #
22
+ # @param success [Boolean]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,193 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Rewards#create
7
+ class Reward < GrowsurfRuby::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute is_unlimited
14
+ #
15
+ # @return [Boolean]
16
+ required :is_unlimited, GrowsurfRuby::Internal::Type::Boolean, api_name: :isUnlimited
17
+
18
+ # @!attribute metadata
19
+ # Shallow custom metadata object.
20
+ #
21
+ # @return [Hash{Symbol=>Object}]
22
+ required :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
23
+
24
+ # @!attribute type
25
+ #
26
+ # @return [Symbol, GrowsurfRuby::Models::Campaign::Reward::Type]
27
+ required :type, enum: -> { GrowsurfRuby::Campaign::Reward::Type }
28
+
29
+ # @!attribute commission_structure
30
+ #
31
+ # @return [GrowsurfRuby::Models::CommissionStructure, nil]
32
+ optional :commission_structure,
33
+ -> { GrowsurfRuby::CommissionStructure },
34
+ api_name: :commissionStructure,
35
+ nil?: true
36
+
37
+ # @!attribute conversions_required
38
+ #
39
+ # @return [Integer, nil]
40
+ optional :conversions_required, Integer, api_name: :conversionsRequired, nil?: true
41
+
42
+ # @!attribute coupon_code
43
+ #
44
+ # @return [String, nil]
45
+ optional :coupon_code, String, api_name: :couponCode, nil?: true
46
+
47
+ # @!attribute description
48
+ #
49
+ # @return [String, nil]
50
+ optional :description, String, nil?: true
51
+
52
+ # @!attribute image_url
53
+ #
54
+ # @return [String, nil]
55
+ optional :image_url, String, api_name: :imageUrl, nil?: true
56
+
57
+ # @!attribute limit
58
+ # `-1` represents an unlimited reward in REST responses.
59
+ #
60
+ # @return [Integer, nil]
61
+ optional :limit, Integer, nil?: true
62
+
63
+ # @!attribute limit_duration
64
+ #
65
+ # @return [Symbol, GrowsurfRuby::Models::Campaign::Reward::LimitDuration, nil]
66
+ optional :limit_duration,
67
+ enum: -> { GrowsurfRuby::Campaign::Reward::LimitDuration },
68
+ api_name: :limitDuration,
69
+ nil?: true
70
+
71
+ # @!attribute next_milestone_prefix
72
+ #
73
+ # @return [String, nil]
74
+ optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix, nil?: true
75
+
76
+ # @!attribute next_milestone_suffix
77
+ #
78
+ # @return [String, nil]
79
+ optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix, nil?: true
80
+
81
+ # @!attribute number_of_winners
82
+ #
83
+ # @return [Integer, nil]
84
+ optional :number_of_winners, Integer, api_name: :numberOfWinners, nil?: true
85
+
86
+ # @!attribute order
87
+ #
88
+ # @return [Integer, nil]
89
+ optional :order, Integer, nil?: true
90
+
91
+ # @!attribute referral_coupon_code
92
+ # The coupon code delivered to the referred friend (double-sided rewards).
93
+ #
94
+ # @return [String, nil]
95
+ optional :referral_coupon_code, String, api_name: :referralCouponCode, nil?: true
96
+
97
+ # @!attribute referral_description
98
+ #
99
+ # @return [String, nil]
100
+ optional :referral_description, String, api_name: :referralDescription, nil?: true
101
+
102
+ # @!attribute referred_reward_upfront
103
+ #
104
+ # @return [Boolean, nil]
105
+ optional :referred_reward_upfront,
106
+ GrowsurfRuby::Internal::Type::Boolean,
107
+ api_name: :referredRewardUpfront
108
+
109
+ # @!attribute referred_value
110
+ # Tax valuation for the referred friend's side of a double-sided reward.
111
+ #
112
+ # @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
113
+ optional :referred_value,
114
+ -> { GrowsurfRuby::RewardTaxValuation },
115
+ api_name: :referredValue,
116
+ nil?: true
117
+
118
+ # @!attribute value
119
+ # Tax valuation for the reward (the referrer's side of a double-sided reward).
120
+ #
121
+ # @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
122
+ optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
123
+
124
+ # @!method initialize(id:, is_unlimited:, metadata:, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, image_url: 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, value: nil)
125
+ # @param id [String]
126
+ #
127
+ # @param is_unlimited [Boolean]
128
+ #
129
+ # @param metadata [Hash{Symbol=>Object}] Shallow custom metadata object.
130
+ #
131
+ # @param type [Symbol, GrowsurfRuby::Models::Campaign::Reward::Type]
132
+ #
133
+ # @param commission_structure [GrowsurfRuby::Models::CommissionStructure, nil]
134
+ #
135
+ # @param conversions_required [Integer, nil]
136
+ #
137
+ # @param coupon_code [String, nil]
138
+ #
139
+ # @param description [String, nil]
140
+ #
141
+ # @param image_url [String, nil]
142
+ #
143
+ # @param limit [Integer, nil] `-1` represents an unlimited reward in REST responses.
144
+ #
145
+ # @param limit_duration [Symbol, GrowsurfRuby::Models::Campaign::Reward::LimitDuration, nil]
146
+ #
147
+ # @param next_milestone_prefix [String, nil]
148
+ #
149
+ # @param next_milestone_suffix [String, nil]
150
+ #
151
+ # @param number_of_winners [Integer, nil]
152
+ #
153
+ # @param order [Integer, nil]
154
+ #
155
+ # @param referral_coupon_code [String, nil] The coupon code delivered to the referred friend (double-sided rewards).
156
+ #
157
+ # @param referral_description [String, nil]
158
+ #
159
+ # @param referred_reward_upfront [Boolean]
160
+ #
161
+ # @param referred_value [GrowsurfRuby::Models::RewardTaxValuation, nil] Tax valuation for the referred friend's side of a double-sided reward.
162
+ #
163
+ # @param value [GrowsurfRuby::Models::RewardTaxValuation, nil] Tax valuation for the reward (the referrer's side of a double-sided reward).
164
+
165
+ # @see GrowsurfRuby::Models::Campaign::Reward#type
166
+ module Type
167
+ extend GrowsurfRuby::Internal::Type::Enum
168
+
169
+ SINGLE_SIDED = :SINGLE_SIDED
170
+ DOUBLE_SIDED = :DOUBLE_SIDED
171
+ MILESTONE = :MILESTONE
172
+ LEADERBOARD = :LEADERBOARD
173
+ AFFILIATE = :AFFILIATE
174
+
175
+ # @!method self.values
176
+ # @return [Array<Symbol>]
177
+ end
178
+
179
+ # @see GrowsurfRuby::Models::Campaign::Reward#limit_duration
180
+ module LimitDuration
181
+ extend GrowsurfRuby::Internal::Type::Enum
182
+
183
+ IN_TOTAL = :IN_TOTAL
184
+ PER_MONTH = :PER_MONTH
185
+ PER_YEAR = :PER_YEAR
186
+
187
+ # @!method self.values
188
+ # @return [Array<Symbol>]
189
+ end
190
+ end
191
+ end
192
+ end
193
+ end
@@ -0,0 +1,212 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Rewards#create
7
+ class RewardCreateParams < GrowsurfRuby::Internal::Type::BaseModel
8
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
9
+ include GrowsurfRuby::Internal::Type::RequestParameters
10
+
11
+ # @!attribute type
12
+ #
13
+ # @return [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::Type]
14
+ required :type, enum: -> { GrowsurfRuby::Campaign::RewardCreateParams::Type }
15
+
16
+ # @!attribute commission_structure
17
+ #
18
+ # @return [GrowsurfRuby::Models::CommissionStructure, nil]
19
+ optional :commission_structure,
20
+ -> { GrowsurfRuby::CommissionStructure },
21
+ api_name: :commissionStructure
22
+
23
+ # @!attribute conversions_required
24
+ #
25
+ # @return [Integer, nil]
26
+ optional :conversions_required, Integer, api_name: :conversionsRequired
27
+
28
+ # @!attribute coupon_code
29
+ #
30
+ # @return [String, nil]
31
+ optional :coupon_code, String, api_name: :couponCode
32
+
33
+ # @!attribute description
34
+ #
35
+ # @return [String, nil]
36
+ optional :description, String
37
+
38
+ # @!attribute image_url
39
+ #
40
+ # @return [String, nil]
41
+ optional :image_url, String, api_name: :imageUrl
42
+
43
+ # @!attribute is_active
44
+ #
45
+ # @return [Boolean, nil]
46
+ optional :is_active, GrowsurfRuby::Internal::Type::Boolean, api_name: :isActive
47
+
48
+ # @!attribute is_unlimited
49
+ #
50
+ # @return [Boolean, nil]
51
+ optional :is_unlimited, GrowsurfRuby::Internal::Type::Boolean, api_name: :isUnlimited
52
+
53
+ # @!attribute is_visible
54
+ #
55
+ # @return [Boolean, nil]
56
+ optional :is_visible, GrowsurfRuby::Internal::Type::Boolean, api_name: :isVisible
57
+
58
+ # @!attribute limit
59
+ #
60
+ # @return [Integer, nil]
61
+ optional :limit, Integer
62
+
63
+ # @!attribute limit_duration
64
+ #
65
+ # @return [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::LimitDuration, nil]
66
+ optional :limit_duration,
67
+ enum: -> { GrowsurfRuby::Campaign::RewardCreateParams::LimitDuration },
68
+ api_name: :limitDuration
69
+
70
+ # @!attribute metadata
71
+ # Custom key/value metadata (single-level; values are stored as strings).
72
+ #
73
+ # @return [Hash{Symbol=>Object}, nil]
74
+ optional :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
75
+
76
+ # @!attribute next_milestone_prefix
77
+ #
78
+ # @return [String, nil]
79
+ optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix
80
+
81
+ # @!attribute next_milestone_suffix
82
+ #
83
+ # @return [String, nil]
84
+ optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix
85
+
86
+ # @!attribute number_of_winners
87
+ #
88
+ # @return [Integer, nil]
89
+ optional :number_of_winners, Integer, api_name: :numberOfWinners
90
+
91
+ # @!attribute order
92
+ #
93
+ # @return [Integer, nil]
94
+ optional :order, Integer
95
+
96
+ # @!attribute referral_coupon_code
97
+ #
98
+ # @return [String, nil]
99
+ optional :referral_coupon_code, String, api_name: :referralCouponCode
100
+
101
+ # @!attribute referral_description
102
+ #
103
+ # @return [String, nil]
104
+ optional :referral_description, String, api_name: :referralDescription
105
+
106
+ # @!attribute referred_reward_upfront
107
+ #
108
+ # @return [Boolean, nil]
109
+ optional :referred_reward_upfront,
110
+ GrowsurfRuby::Internal::Type::Boolean,
111
+ api_name: :referredRewardUpfront
112
+
113
+ # @!attribute referred_value
114
+ # Tax valuation for the referred friend's side of a double-sided reward.
115
+ # Defaults to not tax-reportable (a purchase rebate).
116
+ #
117
+ # @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
118
+ optional :referred_value,
119
+ -> { GrowsurfRuby::RewardTaxValuation },
120
+ api_name: :referredValue
121
+
122
+ # @!attribute title
123
+ #
124
+ # @return [String, nil]
125
+ optional :title, String
126
+
127
+ # @!attribute value
128
+ # Tax valuation for the reward (the referrer's side of a double-sided reward).
129
+ # Used by tax documentation / 1099 reporting.
130
+ #
131
+ # @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
132
+ optional :value, -> { GrowsurfRuby::RewardTaxValuation }
133
+
134
+ # @!method initialize(type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, image_url: nil, is_active: 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: {})
135
+ # Some parameter documentations has been truncated, see
136
+ # {GrowsurfRuby::Models::Campaign::RewardCreateParams} for more details.
137
+ #
138
+ # @param type [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::Type]
139
+ #
140
+ # @param commission_structure [GrowsurfRuby::Models::CommissionStructure]
141
+ #
142
+ # @param conversions_required [Integer]
143
+ #
144
+ # @param coupon_code [String]
145
+ #
146
+ # @param description [String]
147
+ #
148
+ # @param image_url [String]
149
+ #
150
+ # @param is_active [Boolean]
151
+ #
152
+ # @param is_unlimited [Boolean]
153
+ #
154
+ # @param is_visible [Boolean]
155
+ #
156
+ # @param limit [Integer]
157
+ #
158
+ # @param limit_duration [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::LimitDuration]
159
+ #
160
+ # @param metadata [Hash{Symbol=>Object}] Custom key/value metadata (single-level; values are stored as strings).
161
+ #
162
+ # @param next_milestone_prefix [String]
163
+ #
164
+ # @param next_milestone_suffix [String]
165
+ #
166
+ # @param number_of_winners [Integer]
167
+ #
168
+ # @param order [Integer]
169
+ #
170
+ # @param referral_coupon_code [String]
171
+ #
172
+ # @param referral_description [String]
173
+ #
174
+ # @param referred_reward_upfront [Boolean]
175
+ #
176
+ # @param referred_value [GrowsurfRuby::Models::RewardTaxValuation] Tax valuation for the referred friend's side of a double-sided reward. Defaults
177
+ #
178
+ # @param title [String]
179
+ #
180
+ # @param value [GrowsurfRuby::Models::RewardTaxValuation] Tax valuation for the reward (the referrer's side of a double-sided reward). Use
181
+ #
182
+ # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
183
+
184
+ # @see GrowsurfRuby::Models::Campaign::RewardCreateParams#type
185
+ module Type
186
+ extend GrowsurfRuby::Internal::Type::Enum
187
+
188
+ SINGLE_SIDED = :SINGLE_SIDED
189
+ DOUBLE_SIDED = :DOUBLE_SIDED
190
+ MILESTONE = :MILESTONE
191
+ LEADERBOARD = :LEADERBOARD
192
+ AFFILIATE = :AFFILIATE
193
+
194
+ # @!method self.values
195
+ # @return [Array<Symbol>]
196
+ end
197
+
198
+ # @see GrowsurfRuby::Models::Campaign::RewardCreateParams#limit_duration
199
+ module LimitDuration
200
+ extend GrowsurfRuby::Internal::Type::Enum
201
+
202
+ IN_TOTAL = :IN_TOTAL
203
+ PER_MONTH = :PER_MONTH
204
+ PER_YEAR = :PER_YEAR
205
+
206
+ # @!method self.values
207
+ # @return [Array<Symbol>]
208
+ end
209
+ end
210
+ end
211
+ end
212
+ end
@@ -13,14 +13,14 @@ module GrowsurfRuby
13
13
  # @return [String]
14
14
  required :id, String
15
15
 
16
- # @!attribute reward_id
16
+ # @!attribute campaign_reward_id
17
17
  #
18
18
  # @return [String]
19
- required :reward_id, String
19
+ required :campaign_reward_id, String
20
20
 
21
- # @!method initialize(id:, reward_id:, request_options: {})
21
+ # @!method initialize(id:, campaign_reward_id:, request_options: {})
22
22
  # @param id [String]
23
- # @param reward_id [String]
23
+ # @param campaign_reward_id [String]
24
24
  # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
25
25
  end
26
26
  end