growsurf-ruby 0.7.0 → 0.8.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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -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 +166 -0
  7. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +189 -0
  8. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +182 -0
  9. data/lib/growsurf_ruby/models/campaign_create_params.rb +82 -0
  10. data/lib/growsurf_ruby/models/campaign_update_params.rb +112 -0
  11. data/lib/growsurf_ruby/models.rb +4 -0
  12. data/lib/growsurf_ruby/resources/campaign/rewards.rb +191 -0
  13. data/lib/growsurf_ruby/resources/campaign.rb +105 -0
  14. data/lib/growsurf_ruby/version.rb +1 -1
  15. data/lib/growsurf_ruby.rb +8 -0
  16. data/rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi +41 -0
  17. data/rbi/growsurf_ruby/models/campaign/delete_reward_response.rbi +38 -0
  18. data/rbi/growsurf_ruby/models/campaign/reward.rbi +252 -0
  19. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +330 -0
  20. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +281 -0
  21. data/rbi/growsurf_ruby/models/campaign_create_params.rbi +143 -0
  22. data/rbi/growsurf_ruby/models/campaign_update_params.rbi +193 -0
  23. data/rbi/growsurf_ruby/models.rbi +4 -0
  24. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +200 -0
  25. data/rbi/growsurf_ruby/resources/campaign.rbi +99 -0
  26. data/sig/growsurf_ruby/models/campaign/campaign_reward_list_response.rbs +18 -0
  27. data/sig/growsurf_ruby/models/campaign/delete_reward_response.rbs +17 -0
  28. data/sig/growsurf_ruby/models/campaign/reward.rbs +131 -0
  29. data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +192 -0
  30. data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +182 -0
  31. data/sig/growsurf_ruby/models/campaign_create_params.rbs +88 -0
  32. data/sig/growsurf_ruby/models/campaign_update_params.rbs +119 -0
  33. data/sig/growsurf_ruby/models.rbs +4 -0
  34. data/sig/growsurf_ruby/resources/campaign/rewards.rbs +70 -0
  35. data/sig/growsurf_ruby/resources/campaign.rbs +35 -0
  36. metadata +26 -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: 3ea326d15c05d8c75b86335b99e152c1e269196cc3603ed96b38a11281509a26
4
+ data.tar.gz: ccc73ce7424bd230f00745bc08d843c5a1bcee077468c5ee5d01ee497578f9e2
5
5
  SHA512:
6
- metadata.gz: d3b33af554e8fac71c6c3e4df21a5565c188fee651fe4d316f6c0486c0349c460bb737e2a96c852bd8856aa01e469bbf3c65c5314617b5a800423f9558e3fa70
7
- data.tar.gz: db54fe7cfff4279d0af2d57589aa66106a2e0b83ce59c5a37fe6809145cca0edc59a0b3dab2a0a51c93592a1016b55564469ff05a6934ec0973ad206c5f35ffe
6
+ metadata.gz: 67581d38788ab7a27e22a1f5d010e6a85e152ded9d3f5ffd512c22dd2ac52df70452254fdb02a91b237ef416f27a5326df0240b4111ce2b67bd1f8606b64d00b
7
+ data.tar.gz: 05b6ad5c2614c5ba9647bd7b54874d2feeb720659f2ae7930252afc48781d100fe0edac724b2b5f7ef789f0a75851621c0b73de2c4226a3b7602515227627c5e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.0](https://github.com/growsurf/growsurf-ruby/compare/v0.7.0...v0.8.0) (2026-07-01)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** add campaign create/update/clone and program-reward CRUD ([aa8d3dd](https://github.com/growsurf/growsurf-ruby/commit/aa8d3ddbf167f26d0807ba58fce2071517afb318))
9
+
3
10
  ## 0.7.0 (2026-06-29)
4
11
 
5
12
  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", "~> 0.8.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,166 @@
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_description
92
+ #
93
+ # @return [String, nil]
94
+ optional :referral_description, String, api_name: :referralDescription, nil?: true
95
+
96
+ # @!attribute referred_reward_upfront
97
+ #
98
+ # @return [Boolean, nil]
99
+ optional :referred_reward_upfront,
100
+ GrowsurfRuby::Internal::Type::Boolean,
101
+ api_name: :referredRewardUpfront
102
+
103
+ # @!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_description: nil, referred_reward_upfront: nil)
104
+ # @param id [String]
105
+ #
106
+ # @param is_unlimited [Boolean]
107
+ #
108
+ # @param metadata [Hash{Symbol=>Object}] Shallow custom metadata object.
109
+ #
110
+ # @param type [Symbol, GrowsurfRuby::Models::Campaign::Reward::Type]
111
+ #
112
+ # @param commission_structure [GrowsurfRuby::Models::CommissionStructure, nil]
113
+ #
114
+ # @param conversions_required [Integer, nil]
115
+ #
116
+ # @param coupon_code [String, nil]
117
+ #
118
+ # @param description [String, nil]
119
+ #
120
+ # @param image_url [String, nil]
121
+ #
122
+ # @param limit [Integer, nil] `-1` represents an unlimited reward in REST responses.
123
+ #
124
+ # @param limit_duration [Symbol, GrowsurfRuby::Models::Campaign::Reward::LimitDuration, nil]
125
+ #
126
+ # @param next_milestone_prefix [String, nil]
127
+ #
128
+ # @param next_milestone_suffix [String, nil]
129
+ #
130
+ # @param number_of_winners [Integer, nil]
131
+ #
132
+ # @param order [Integer, nil]
133
+ #
134
+ # @param referral_description [String, nil]
135
+ #
136
+ # @param referred_reward_upfront [Boolean]
137
+
138
+ # @see GrowsurfRuby::Models::Campaign::Reward#type
139
+ module Type
140
+ extend GrowsurfRuby::Internal::Type::Enum
141
+
142
+ SINGLE_SIDED = :SINGLE_SIDED
143
+ DOUBLE_SIDED = :DOUBLE_SIDED
144
+ MILESTONE = :MILESTONE
145
+ LEADERBOARD = :LEADERBOARD
146
+ AFFILIATE = :AFFILIATE
147
+
148
+ # @!method self.values
149
+ # @return [Array<Symbol>]
150
+ end
151
+
152
+ # @see GrowsurfRuby::Models::Campaign::Reward#limit_duration
153
+ module LimitDuration
154
+ extend GrowsurfRuby::Internal::Type::Enum
155
+
156
+ IN_TOTAL = :IN_TOTAL
157
+ PER_MONTH = :PER_MONTH
158
+ PER_YEAR = :PER_YEAR
159
+
160
+ # @!method self.values
161
+ # @return [Array<Symbol>]
162
+ end
163
+ end
164
+ end
165
+ end
166
+ end
@@ -0,0 +1,189 @@
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 title
114
+ #
115
+ # @return [String, nil]
116
+ optional :title, String
117
+
118
+ # @!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, title: nil, request_options: {})
119
+ # @param type [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::Type]
120
+ #
121
+ # @param commission_structure [GrowsurfRuby::Models::CommissionStructure]
122
+ #
123
+ # @param conversions_required [Integer]
124
+ #
125
+ # @param coupon_code [String]
126
+ #
127
+ # @param description [String]
128
+ #
129
+ # @param image_url [String]
130
+ #
131
+ # @param is_active [Boolean]
132
+ #
133
+ # @param is_unlimited [Boolean]
134
+ #
135
+ # @param is_visible [Boolean]
136
+ #
137
+ # @param limit [Integer]
138
+ #
139
+ # @param limit_duration [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::LimitDuration]
140
+ #
141
+ # @param metadata [Hash{Symbol=>Object}] Custom key/value metadata (single-level; values are stored as strings).
142
+ #
143
+ # @param next_milestone_prefix [String]
144
+ #
145
+ # @param next_milestone_suffix [String]
146
+ #
147
+ # @param number_of_winners [Integer]
148
+ #
149
+ # @param order [Integer]
150
+ #
151
+ # @param referral_coupon_code [String]
152
+ #
153
+ # @param referral_description [String]
154
+ #
155
+ # @param referred_reward_upfront [Boolean]
156
+ #
157
+ # @param title [String]
158
+ #
159
+ # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
160
+
161
+ # @see GrowsurfRuby::Models::Campaign::RewardCreateParams#type
162
+ module Type
163
+ extend GrowsurfRuby::Internal::Type::Enum
164
+
165
+ SINGLE_SIDED = :SINGLE_SIDED
166
+ DOUBLE_SIDED = :DOUBLE_SIDED
167
+ MILESTONE = :MILESTONE
168
+ LEADERBOARD = :LEADERBOARD
169
+ AFFILIATE = :AFFILIATE
170
+
171
+ # @!method self.values
172
+ # @return [Array<Symbol>]
173
+ end
174
+
175
+ # @see GrowsurfRuby::Models::Campaign::RewardCreateParams#limit_duration
176
+ module LimitDuration
177
+ extend GrowsurfRuby::Internal::Type::Enum
178
+
179
+ IN_TOTAL = :IN_TOTAL
180
+ PER_MONTH = :PER_MONTH
181
+ PER_YEAR = :PER_YEAR
182
+
183
+ # @!method self.values
184
+ # @return [Array<Symbol>]
185
+ end
186
+ end
187
+ end
188
+ end
189
+ end
@@ -0,0 +1,182 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Rewards#update
7
+ class RewardUpdateParams < GrowsurfRuby::Internal::Type::BaseModel
8
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
9
+ include GrowsurfRuby::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute reward_id
17
+ #
18
+ # @return [String]
19
+ required :reward_id, String
20
+
21
+ # @!attribute commission_structure
22
+ #
23
+ # @return [GrowsurfRuby::Models::CommissionStructure, nil]
24
+ optional :commission_structure,
25
+ -> { GrowsurfRuby::CommissionStructure },
26
+ api_name: :commissionStructure
27
+
28
+ # @!attribute conversions_required
29
+ #
30
+ # @return [Integer, nil]
31
+ optional :conversions_required, Integer, api_name: :conversionsRequired
32
+
33
+ # @!attribute coupon_code
34
+ #
35
+ # @return [String, nil]
36
+ optional :coupon_code, String, api_name: :couponCode
37
+
38
+ # @!attribute description
39
+ #
40
+ # @return [String, nil]
41
+ optional :description, String
42
+
43
+ # @!attribute image_url
44
+ #
45
+ # @return [String, nil]
46
+ optional :image_url, String, api_name: :imageUrl
47
+
48
+ # @!attribute is_active
49
+ #
50
+ # @return [Boolean, nil]
51
+ optional :is_active, GrowsurfRuby::Internal::Type::Boolean, api_name: :isActive
52
+
53
+ # @!attribute is_unlimited
54
+ #
55
+ # @return [Boolean, nil]
56
+ optional :is_unlimited, GrowsurfRuby::Internal::Type::Boolean, api_name: :isUnlimited
57
+
58
+ # @!attribute is_visible
59
+ #
60
+ # @return [Boolean, nil]
61
+ optional :is_visible, GrowsurfRuby::Internal::Type::Boolean, api_name: :isVisible
62
+
63
+ # @!attribute limit
64
+ #
65
+ # @return [Integer, nil]
66
+ optional :limit, Integer
67
+
68
+ # @!attribute limit_duration
69
+ #
70
+ # @return [Symbol, GrowsurfRuby::Models::Campaign::RewardUpdateParams::LimitDuration, nil]
71
+ optional :limit_duration,
72
+ enum: -> { GrowsurfRuby::Campaign::RewardUpdateParams::LimitDuration },
73
+ api_name: :limitDuration
74
+
75
+ # @!attribute metadata
76
+ # Custom key/value metadata (single-level; values are stored as strings).
77
+ #
78
+ # @return [Hash{Symbol=>Object}, nil]
79
+ optional :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
80
+
81
+ # @!attribute next_milestone_prefix
82
+ #
83
+ # @return [String, nil]
84
+ optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix
85
+
86
+ # @!attribute next_milestone_suffix
87
+ #
88
+ # @return [String, nil]
89
+ optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix
90
+
91
+ # @!attribute number_of_winners
92
+ #
93
+ # @return [Integer, nil]
94
+ optional :number_of_winners, Integer, api_name: :numberOfWinners
95
+
96
+ # @!attribute order
97
+ #
98
+ # @return [Integer, nil]
99
+ optional :order, Integer
100
+
101
+ # @!attribute referral_coupon_code
102
+ #
103
+ # @return [String, nil]
104
+ optional :referral_coupon_code, String, api_name: :referralCouponCode
105
+
106
+ # @!attribute referral_description
107
+ #
108
+ # @return [String, nil]
109
+ optional :referral_description, String, api_name: :referralDescription
110
+
111
+ # @!attribute referred_reward_upfront
112
+ #
113
+ # @return [Boolean, nil]
114
+ optional :referred_reward_upfront,
115
+ GrowsurfRuby::Internal::Type::Boolean,
116
+ api_name: :referredRewardUpfront
117
+
118
+ # @!attribute title
119
+ #
120
+ # @return [String, nil]
121
+ optional :title, String
122
+
123
+ # @!method initialize(id:, reward_id:, 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, title: nil, request_options: {})
124
+ # @param id [String]
125
+ #
126
+ # @param reward_id [String]
127
+ #
128
+ # @param commission_structure [GrowsurfRuby::Models::CommissionStructure]
129
+ #
130
+ # @param conversions_required [Integer]
131
+ #
132
+ # @param coupon_code [String]
133
+ #
134
+ # @param description [String]
135
+ #
136
+ # @param image_url [String]
137
+ #
138
+ # @param is_active [Boolean]
139
+ #
140
+ # @param is_unlimited [Boolean]
141
+ #
142
+ # @param is_visible [Boolean]
143
+ #
144
+ # @param limit [Integer]
145
+ #
146
+ # @param limit_duration [Symbol, GrowsurfRuby::Models::Campaign::RewardUpdateParams::LimitDuration]
147
+ #
148
+ # @param metadata [Hash{Symbol=>Object}] Custom key/value metadata (single-level; values are stored as strings).
149
+ #
150
+ # @param next_milestone_prefix [String]
151
+ #
152
+ # @param next_milestone_suffix [String]
153
+ #
154
+ # @param number_of_winners [Integer]
155
+ #
156
+ # @param order [Integer]
157
+ #
158
+ # @param referral_coupon_code [String]
159
+ #
160
+ # @param referral_description [String]
161
+ #
162
+ # @param referred_reward_upfront [Boolean]
163
+ #
164
+ # @param title [String]
165
+ #
166
+ # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
167
+
168
+ # @see GrowsurfRuby::Models::Campaign::RewardUpdateParams#limit_duration
169
+ module LimitDuration
170
+ extend GrowsurfRuby::Internal::Type::Enum
171
+
172
+ IN_TOTAL = :IN_TOTAL
173
+ PER_MONTH = :PER_MONTH
174
+ PER_YEAR = :PER_YEAR
175
+
176
+ # @!method self.values
177
+ # @return [Array<Symbol>]
178
+ end
179
+ end
180
+ end
181
+ end
182
+ end