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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/models/campaign/reward.rb +28 -1
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +24 -1
- data/lib/growsurf_ruby/models/campaign/reward_delete_params.rb +4 -4
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +27 -4
- data/lib/growsurf_ruby/models/campaign.rb +28 -1
- data/lib/growsurf_ruby/models/campaign_create_params.rb +1 -15
- data/lib/growsurf_ruby/models/campaign_update_params.rb +1 -50
- data/lib/growsurf_ruby/models/reward_tax_valuation.rb +35 -0
- data/lib/growsurf_ruby/models.rb +2 -0
- data/lib/growsurf_ruby/resources/campaign/design.rb +66 -0
- data/lib/growsurf_ruby/resources/campaign/emails.rb +63 -0
- data/lib/growsurf_ruby/resources/campaign/installation.rb +65 -0
- data/lib/growsurf_ruby/resources/campaign/options.rb +63 -0
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +21 -13
- data/lib/growsurf_ruby/resources/campaign.rb +32 -25
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +5 -0
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +42 -3
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +28 -0
- data/rbi/growsurf_ruby/models/campaign/reward_delete_params.rbi +4 -4
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +32 -4
- data/rbi/growsurf_ruby/models/campaign.rbi +42 -3
- data/rbi/growsurf_ruby/models/campaign_create_params.rbi +0 -18
- data/rbi/growsurf_ruby/models/campaign_update_params.rbi +0 -63
- data/rbi/growsurf_ruby/models/reward_tax_valuation.rbi +56 -0
- data/rbi/growsurf_ruby/models.rbi +2 -0
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +50 -0
- data/rbi/growsurf_ruby/resources/campaign/emails.rbi +49 -0
- data/rbi/growsurf_ruby/resources/campaign/installation.rbi +50 -0
- data/rbi/growsurf_ruby/resources/campaign/options.rbi +49 -0
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +24 -8
- data/rbi/growsurf_ruby/resources/campaign.rbi +25 -30
- data/sig/growsurf_ruby/models/campaign/reward.rbs +18 -3
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +19 -1
- data/sig/growsurf_ruby/models/campaign/reward_delete_params.rbs +4 -4
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +23 -5
- data/sig/growsurf_ruby/models/campaign.rbs +18 -3
- data/sig/growsurf_ruby/models/campaign_create_params.rbs +0 -14
- data/sig/growsurf_ruby/models/campaign_update_params.rbs +0 -49
- data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +19 -0
- data/sig/growsurf_ruby/models.rbs +2 -0
- data/sig/growsurf_ruby/resources/campaign/design.rbs +20 -0
- data/sig/growsurf_ruby/resources/campaign/emails.rbs +20 -0
- data/sig/growsurf_ruby/resources/campaign/installation.rbs +20 -0
- data/sig/growsurf_ruby/resources/campaign/options.rbs +20 -0
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +6 -2
- data/sig/growsurf_ruby/resources/campaign.rbs +8 -9
- metadata +17 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3f01d0f2cb2534783b61dc721b1fde1d8f4465951558a08e474a2c0816b55785
|
|
4
|
+
data.tar.gz: bc309ac0246f6ee795ccb48487c37f366c3e04293cdc9f3fea0ef55c8a8576e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bf7d990bbf244492889bdb83c07478bee329598a80eaf4bb48a9445fb322fcdd10fa1a7854a19c8f5dee29f4277d7a3a13c557f5329ebada1309ba7f7a299461
|
|
7
|
+
data.tar.gz: 4157fc3ebf661d9a92f4713b9f10d91f1f31f6d298449684c5f01946c85909eb3fbf02aefff7399282d7d9c81f124878543806cc307629752105c7156355c1cc
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
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
|
+
|
|
3
14
|
## [0.8.0](https://github.com/growsurf/growsurf-ruby/compare/v0.7.0...v0.8.0) (2026-07-01)
|
|
4
15
|
|
|
5
16
|
|
data/README.md
CHANGED
|
@@ -88,6 +88,12 @@ module GrowsurfRuby
|
|
|
88
88
|
# @return [Integer, nil]
|
|
89
89
|
optional :order, Integer, nil?: true
|
|
90
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
|
+
|
|
91
97
|
# @!attribute referral_description
|
|
92
98
|
#
|
|
93
99
|
# @return [String, nil]
|
|
@@ -100,7 +106,22 @@ module GrowsurfRuby
|
|
|
100
106
|
GrowsurfRuby::Internal::Type::Boolean,
|
|
101
107
|
api_name: :referredRewardUpfront
|
|
102
108
|
|
|
103
|
-
# @!
|
|
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)
|
|
104
125
|
# @param id [String]
|
|
105
126
|
#
|
|
106
127
|
# @param is_unlimited [Boolean]
|
|
@@ -131,9 +152,15 @@ module GrowsurfRuby
|
|
|
131
152
|
#
|
|
132
153
|
# @param order [Integer, nil]
|
|
133
154
|
#
|
|
155
|
+
# @param referral_coupon_code [String, nil] The coupon code delivered to the referred friend (double-sided rewards).
|
|
156
|
+
#
|
|
134
157
|
# @param referral_description [String, nil]
|
|
135
158
|
#
|
|
136
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).
|
|
137
164
|
|
|
138
165
|
# @see GrowsurfRuby::Models::Campaign::Reward#type
|
|
139
166
|
module Type
|
|
@@ -110,12 +110,31 @@ module GrowsurfRuby
|
|
|
110
110
|
GrowsurfRuby::Internal::Type::Boolean,
|
|
111
111
|
api_name: :referredRewardUpfront
|
|
112
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
|
+
|
|
113
122
|
# @!attribute title
|
|
114
123
|
#
|
|
115
124
|
# @return [String, nil]
|
|
116
125
|
optional :title, String
|
|
117
126
|
|
|
118
|
-
# @!
|
|
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
|
+
#
|
|
119
138
|
# @param type [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::Type]
|
|
120
139
|
#
|
|
121
140
|
# @param commission_structure [GrowsurfRuby::Models::CommissionStructure]
|
|
@@ -154,8 +173,12 @@ module GrowsurfRuby
|
|
|
154
173
|
#
|
|
155
174
|
# @param referred_reward_upfront [Boolean]
|
|
156
175
|
#
|
|
176
|
+
# @param referred_value [GrowsurfRuby::Models::RewardTaxValuation] Tax valuation for the referred friend's side of a double-sided reward. Defaults
|
|
177
|
+
#
|
|
157
178
|
# @param title [String]
|
|
158
179
|
#
|
|
180
|
+
# @param value [GrowsurfRuby::Models::RewardTaxValuation] Tax valuation for the reward (the referrer's side of a double-sided reward). Use
|
|
181
|
+
#
|
|
159
182
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
160
183
|
|
|
161
184
|
# @see GrowsurfRuby::Models::Campaign::RewardCreateParams#type
|
|
@@ -13,14 +13,14 @@ module GrowsurfRuby
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :id, String
|
|
15
15
|
|
|
16
|
-
# @!attribute
|
|
16
|
+
# @!attribute campaign_reward_id
|
|
17
17
|
#
|
|
18
18
|
# @return [String]
|
|
19
|
-
required :
|
|
19
|
+
required :campaign_reward_id, String
|
|
20
20
|
|
|
21
|
-
# @!method initialize(id:,
|
|
21
|
+
# @!method initialize(id:, campaign_reward_id:, request_options: {})
|
|
22
22
|
# @param id [String]
|
|
23
|
-
# @param
|
|
23
|
+
# @param campaign_reward_id [String]
|
|
24
24
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
25
25
|
end
|
|
26
26
|
end
|
|
@@ -13,10 +13,10 @@ module GrowsurfRuby
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :id, String
|
|
15
15
|
|
|
16
|
-
# @!attribute
|
|
16
|
+
# @!attribute campaign_reward_id
|
|
17
17
|
#
|
|
18
18
|
# @return [String]
|
|
19
|
-
required :
|
|
19
|
+
required :campaign_reward_id, String
|
|
20
20
|
|
|
21
21
|
# @!attribute commission_structure
|
|
22
22
|
#
|
|
@@ -115,15 +115,34 @@ module GrowsurfRuby
|
|
|
115
115
|
GrowsurfRuby::Internal::Type::Boolean,
|
|
116
116
|
api_name: :referredRewardUpfront
|
|
117
117
|
|
|
118
|
+
# @!attribute referred_value
|
|
119
|
+
# Tax valuation for the referred friend's side of a double-sided reward.
|
|
120
|
+
# Defaults to not tax-reportable (a purchase rebate).
|
|
121
|
+
#
|
|
122
|
+
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
123
|
+
optional :referred_value,
|
|
124
|
+
-> { GrowsurfRuby::RewardTaxValuation },
|
|
125
|
+
api_name: :referredValue
|
|
126
|
+
|
|
118
127
|
# @!attribute title
|
|
119
128
|
#
|
|
120
129
|
# @return [String, nil]
|
|
121
130
|
optional :title, String
|
|
122
131
|
|
|
123
|
-
# @!
|
|
132
|
+
# @!attribute value
|
|
133
|
+
# Tax valuation for the reward (the referrer's side of a double-sided reward).
|
|
134
|
+
# Used by tax documentation / 1099 reporting.
|
|
135
|
+
#
|
|
136
|
+
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
137
|
+
optional :value, -> { GrowsurfRuby::RewardTaxValuation }
|
|
138
|
+
|
|
139
|
+
# @!method initialize(id:, campaign_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, referred_value: nil, title: nil, value: nil, request_options: {})
|
|
140
|
+
# Some parameter documentations has been truncated, see
|
|
141
|
+
# {GrowsurfRuby::Models::Campaign::RewardUpdateParams} for more details.
|
|
142
|
+
#
|
|
124
143
|
# @param id [String]
|
|
125
144
|
#
|
|
126
|
-
# @param
|
|
145
|
+
# @param campaign_reward_id [String]
|
|
127
146
|
#
|
|
128
147
|
# @param commission_structure [GrowsurfRuby::Models::CommissionStructure]
|
|
129
148
|
#
|
|
@@ -161,8 +180,12 @@ module GrowsurfRuby
|
|
|
161
180
|
#
|
|
162
181
|
# @param referred_reward_upfront [Boolean]
|
|
163
182
|
#
|
|
183
|
+
# @param referred_value [GrowsurfRuby::Models::RewardTaxValuation] Tax valuation for the referred friend's side of a double-sided reward. Defaults
|
|
184
|
+
#
|
|
164
185
|
# @param title [String]
|
|
165
186
|
#
|
|
187
|
+
# @param value [GrowsurfRuby::Models::RewardTaxValuation] Tax valuation for the reward (the referrer's side of a double-sided reward). Use
|
|
188
|
+
#
|
|
166
189
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
167
190
|
|
|
168
191
|
# @see GrowsurfRuby::Models::Campaign::RewardUpdateParams#limit_duration
|
|
@@ -156,6 +156,12 @@ module GrowsurfRuby
|
|
|
156
156
|
# @return [Integer, nil]
|
|
157
157
|
optional :order, Integer, nil?: true
|
|
158
158
|
|
|
159
|
+
# @!attribute referral_coupon_code
|
|
160
|
+
# The coupon code delivered to the referred friend (double-sided rewards).
|
|
161
|
+
#
|
|
162
|
+
# @return [String, nil]
|
|
163
|
+
optional :referral_coupon_code, String, api_name: :referralCouponCode, nil?: true
|
|
164
|
+
|
|
159
165
|
# @!attribute referral_description
|
|
160
166
|
#
|
|
161
167
|
# @return [String, nil]
|
|
@@ -168,7 +174,22 @@ module GrowsurfRuby
|
|
|
168
174
|
GrowsurfRuby::Internal::Type::Boolean,
|
|
169
175
|
api_name: :referredRewardUpfront
|
|
170
176
|
|
|
171
|
-
# @!
|
|
177
|
+
# @!attribute referred_value
|
|
178
|
+
# Tax valuation for the referred friend's side of a double-sided reward.
|
|
179
|
+
#
|
|
180
|
+
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
181
|
+
optional :referred_value,
|
|
182
|
+
-> { GrowsurfRuby::RewardTaxValuation },
|
|
183
|
+
api_name: :referredValue,
|
|
184
|
+
nil?: true
|
|
185
|
+
|
|
186
|
+
# @!attribute value
|
|
187
|
+
# Tax valuation for the reward (the referrer's side of a double-sided reward).
|
|
188
|
+
#
|
|
189
|
+
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
190
|
+
optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
|
|
191
|
+
|
|
192
|
+
# @!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)
|
|
172
193
|
# @param id [String]
|
|
173
194
|
#
|
|
174
195
|
# @param is_unlimited [Boolean]
|
|
@@ -199,9 +220,15 @@ module GrowsurfRuby
|
|
|
199
220
|
#
|
|
200
221
|
# @param order [Integer, nil]
|
|
201
222
|
#
|
|
223
|
+
# @param referral_coupon_code [String, nil] The coupon code delivered to the referred friend (double-sided rewards).
|
|
224
|
+
#
|
|
202
225
|
# @param referral_description [String, nil]
|
|
203
226
|
#
|
|
204
227
|
# @param referred_reward_upfront [Boolean]
|
|
228
|
+
#
|
|
229
|
+
# @param referred_value [GrowsurfRuby::Models::RewardTaxValuation, nil] Tax valuation for the referred friend's side of a double-sided reward.
|
|
230
|
+
#
|
|
231
|
+
# @param value [GrowsurfRuby::Models::RewardTaxValuation, nil] Tax valuation for the reward (the referrer's side of a double-sided reward).
|
|
205
232
|
|
|
206
233
|
# @see GrowsurfRuby::Models::CampaignAPI::Reward#type
|
|
207
234
|
module Type
|
|
@@ -27,28 +27,18 @@ module GrowsurfRuby
|
|
|
27
27
|
# @return [String, nil]
|
|
28
28
|
optional :currency_iso, String, api_name: :currencyISO
|
|
29
29
|
|
|
30
|
-
# @!attribute goal
|
|
31
|
-
#
|
|
32
|
-
# @return [String, nil]
|
|
33
|
-
optional :goal, String
|
|
34
|
-
|
|
35
30
|
# @!attribute name
|
|
36
31
|
#
|
|
37
32
|
# @return [String, nil]
|
|
38
33
|
optional :name, String
|
|
39
34
|
|
|
40
|
-
# @!attribute options
|
|
41
|
-
#
|
|
42
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
43
|
-
optional :options, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
44
|
-
|
|
45
35
|
# @!attribute rewards
|
|
46
36
|
#
|
|
47
37
|
# @return [Array<GrowsurfRuby::Models::Campaign::RewardCreateParams>, nil]
|
|
48
38
|
optional :rewards,
|
|
49
39
|
-> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::RewardCreateParams] }
|
|
50
40
|
|
|
51
|
-
# @!method initialize(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil,
|
|
41
|
+
# @!method initialize(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil, name: nil, rewards: nil, request_options: {})
|
|
52
42
|
# @param type [Symbol, GrowsurfRuby::Models::CampaignCreateParams::Type]
|
|
53
43
|
#
|
|
54
44
|
# @param company_logo_image_url [String]
|
|
@@ -57,12 +47,8 @@ module GrowsurfRuby
|
|
|
57
47
|
#
|
|
58
48
|
# @param currency_iso [String]
|
|
59
49
|
#
|
|
60
|
-
# @param goal [String]
|
|
61
|
-
#
|
|
62
50
|
# @param name [String]
|
|
63
51
|
#
|
|
64
|
-
# @param options [Hash{Symbol=>Object}]
|
|
65
|
-
#
|
|
66
52
|
# @param rewards [Array<GrowsurfRuby::Models::Campaign::RewardCreateParams>]
|
|
67
53
|
#
|
|
68
54
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -22,74 +22,25 @@ module GrowsurfRuby
|
|
|
22
22
|
# @return [String, nil]
|
|
23
23
|
optional :company_name, String, api_name: :companyName
|
|
24
24
|
|
|
25
|
-
# @!attribute currency_iso
|
|
26
|
-
#
|
|
27
|
-
# @return [String, nil]
|
|
28
|
-
optional :currency_iso, String, api_name: :currencyISO
|
|
29
|
-
|
|
30
|
-
# @!attribute design
|
|
31
|
-
#
|
|
32
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
33
|
-
optional :design, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
34
|
-
|
|
35
|
-
# @!attribute emails
|
|
36
|
-
#
|
|
37
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
38
|
-
optional :emails, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
39
|
-
|
|
40
|
-
# @!attribute goal
|
|
41
|
-
#
|
|
42
|
-
# @return [String, nil]
|
|
43
|
-
optional :goal, String
|
|
44
|
-
|
|
45
|
-
# @!attribute installation
|
|
46
|
-
#
|
|
47
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
48
|
-
optional :installation, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
49
|
-
|
|
50
25
|
# @!attribute name
|
|
51
26
|
#
|
|
52
27
|
# @return [String, nil]
|
|
53
28
|
optional :name, String
|
|
54
29
|
|
|
55
|
-
# @!attribute notifications
|
|
56
|
-
#
|
|
57
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
58
|
-
optional :notifications, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
59
|
-
|
|
60
|
-
# @!attribute options
|
|
61
|
-
#
|
|
62
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
63
|
-
optional :options, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
64
|
-
|
|
65
30
|
# @!attribute status
|
|
66
31
|
#
|
|
67
32
|
# @return [Symbol, GrowsurfRuby::Models::CampaignUpdateParams::Status, nil]
|
|
68
33
|
optional :status, enum: -> { GrowsurfRuby::CampaignUpdateParams::Status }
|
|
69
34
|
|
|
70
|
-
# @!method initialize(id:, company_logo_image_url: nil, company_name: nil,
|
|
35
|
+
# @!method initialize(id:, company_logo_image_url: nil, company_name: nil, name: nil, status: nil, request_options: {})
|
|
71
36
|
# @param id [String]
|
|
72
37
|
#
|
|
73
38
|
# @param company_logo_image_url [String]
|
|
74
39
|
#
|
|
75
40
|
# @param company_name [String]
|
|
76
41
|
#
|
|
77
|
-
# @param currency_iso [String]
|
|
78
|
-
#
|
|
79
|
-
# @param design [Hash{Symbol=>Object}]
|
|
80
|
-
#
|
|
81
|
-
# @param emails [Hash{Symbol=>Object}]
|
|
82
|
-
#
|
|
83
|
-
# @param goal [String]
|
|
84
|
-
#
|
|
85
|
-
# @param installation [Hash{Symbol=>Object}]
|
|
86
|
-
#
|
|
87
42
|
# @param name [String]
|
|
88
43
|
#
|
|
89
|
-
# @param notifications [Hash{Symbol=>Object}]
|
|
90
|
-
#
|
|
91
|
-
# @param options [Hash{Symbol=>Object}]
|
|
92
|
-
#
|
|
93
44
|
# @param status [Symbol, GrowsurfRuby::Models::CampaignUpdateParams::Status]
|
|
94
45
|
#
|
|
95
46
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class RewardTaxValuation < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute fair_market_value_usd
|
|
7
|
+
# Manual fair-market value in USD (major units) used as the fallback when the
|
|
8
|
+
# reward value cannot be resolved automatically. `null` = no manual value.
|
|
9
|
+
#
|
|
10
|
+
# @return [Float, nil]
|
|
11
|
+
optional :fair_market_value_usd, Float, api_name: :fairMarketValueUSD, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute is_tax_reportable
|
|
14
|
+
# Whether the reward's value counts toward 1099 thresholds/totals. `null` = use
|
|
15
|
+
# the smart default for the reward's source.
|
|
16
|
+
#
|
|
17
|
+
# @return [Boolean, nil]
|
|
18
|
+
optional :is_tax_reportable,
|
|
19
|
+
GrowsurfRuby::Internal::Type::Boolean,
|
|
20
|
+
api_name: :isTaxReportable,
|
|
21
|
+
nil?: true
|
|
22
|
+
|
|
23
|
+
# @!method initialize(fair_market_value_usd: nil, is_tax_reportable: nil)
|
|
24
|
+
# Some parameter documentations has been truncated, see
|
|
25
|
+
# {GrowsurfRuby::Models::RewardTaxValuation} for more details.
|
|
26
|
+
#
|
|
27
|
+
# Tax valuation settings for a reward. Only relevant when the program collects
|
|
28
|
+
# tax documentation.
|
|
29
|
+
#
|
|
30
|
+
# @param fair_market_value_usd [Float, nil] Manual fair-market value in USD (major units) used as the fallback when the rewa
|
|
31
|
+
#
|
|
32
|
+
# @param is_tax_reportable [Boolean, nil] Whether the reward's value counts toward 1099 thresholds/totals. `null` = use th
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
data/lib/growsurf_ruby/models.rb
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
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 (window layout, header, share channels, signup
|
|
9
|
+
# form, portal/landing pages, theme styling, and summary/status sections).
|
|
10
|
+
#
|
|
11
|
+
# This is a large, deeply nested object whose available fields depend on the
|
|
12
|
+
# program type. See the API reference for the full field list.
|
|
13
|
+
#
|
|
14
|
+
# @overload retrieve(id, request_options: {})
|
|
15
|
+
#
|
|
16
|
+
# @param id [String] GrowSurf program ID.
|
|
17
|
+
#
|
|
18
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
19
|
+
#
|
|
20
|
+
# @return [Hash{Symbol=>Object}]
|
|
21
|
+
def retrieve(id, params = {})
|
|
22
|
+
@client.request(
|
|
23
|
+
method: :get,
|
|
24
|
+
path: ["campaign/%1$s/design", id],
|
|
25
|
+
model: GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown],
|
|
26
|
+
options: params[:request_options]
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Updates a program's design configuration. Only the fields you send are changed (a
|
|
31
|
+
# surgical merge; arrays such as `signup.fields` replace wholesale). Unknown
|
|
32
|
+
# fields, fields not available for the program type, and invalid values return a
|
|
33
|
+
# `400`.
|
|
34
|
+
#
|
|
35
|
+
# The request body is a partial {CampaignDesign} object — see the API reference for
|
|
36
|
+
# the full field list.
|
|
37
|
+
#
|
|
38
|
+
# @overload update(id, body, request_options: {})
|
|
39
|
+
#
|
|
40
|
+
# @param id [String] GrowSurf program ID.
|
|
41
|
+
#
|
|
42
|
+
# @param body [Hash{Symbol=>Object}] Partial design configuration to merge.
|
|
43
|
+
#
|
|
44
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
45
|
+
#
|
|
46
|
+
# @return [Hash{Symbol=>Object}]
|
|
47
|
+
def update(id, body, params = {})
|
|
48
|
+
@client.request(
|
|
49
|
+
method: :patch,
|
|
50
|
+
path: ["campaign/%1$s/design", id],
|
|
51
|
+
body: body,
|
|
52
|
+
model: GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown],
|
|
53
|
+
options: params[:request_options]
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# @api private
|
|
58
|
+
#
|
|
59
|
+
# @param client [GrowsurfRuby::Client]
|
|
60
|
+
def initialize(client:)
|
|
61
|
+
@client = client
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
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 (per-email templates plus sender, contact, and
|
|
9
|
+
# design settings).
|
|
10
|
+
#
|
|
11
|
+
# This is a large, nested object. See the API reference for the full field list.
|
|
12
|
+
#
|
|
13
|
+
# @overload retrieve(id, request_options: {})
|
|
14
|
+
#
|
|
15
|
+
# @param id [String] GrowSurf program ID.
|
|
16
|
+
#
|
|
17
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
18
|
+
#
|
|
19
|
+
# @return [Hash{Symbol=>Object}]
|
|
20
|
+
def retrieve(id, params = {})
|
|
21
|
+
@client.request(
|
|
22
|
+
method: :get,
|
|
23
|
+
path: ["campaign/%1$s/emails", id],
|
|
24
|
+
model: GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown],
|
|
25
|
+
options: params[:request_options]
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Updates a program's email configuration. Only the fields you send are changed.
|
|
30
|
+
# Unknown fields and invalid values return a `400`.
|
|
31
|
+
#
|
|
32
|
+
# The request body is a partial {CampaignEmails} object — see the API reference for
|
|
33
|
+
# the full field list.
|
|
34
|
+
#
|
|
35
|
+
# @overload update(id, body, request_options: {})
|
|
36
|
+
#
|
|
37
|
+
# @param id [String] GrowSurf program ID.
|
|
38
|
+
#
|
|
39
|
+
# @param body [Hash{Symbol=>Object}] Partial email configuration to merge.
|
|
40
|
+
#
|
|
41
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
42
|
+
#
|
|
43
|
+
# @return [Hash{Symbol=>Object}]
|
|
44
|
+
def update(id, body, params = {})
|
|
45
|
+
@client.request(
|
|
46
|
+
method: :patch,
|
|
47
|
+
path: ["campaign/%1$s/emails", id],
|
|
48
|
+
body: body,
|
|
49
|
+
model: GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown],
|
|
50
|
+
options: params[:request_options]
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# @api private
|
|
55
|
+
#
|
|
56
|
+
# @param client [GrowsurfRuby::Client]
|
|
57
|
+
def initialize(client:)
|
|
58
|
+
@client = client
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
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 (signup and mobile SDK
|
|
9
|
+
# installation settings).
|
|
10
|
+
#
|
|
11
|
+
# This is a nested object whose available fields depend on the program type. See
|
|
12
|
+
# the API reference for the full field list.
|
|
13
|
+
#
|
|
14
|
+
# @overload retrieve(id, request_options: {})
|
|
15
|
+
#
|
|
16
|
+
# @param id [String] GrowSurf program ID.
|
|
17
|
+
#
|
|
18
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
19
|
+
#
|
|
20
|
+
# @return [Hash{Symbol=>Object}]
|
|
21
|
+
def retrieve(id, params = {})
|
|
22
|
+
@client.request(
|
|
23
|
+
method: :get,
|
|
24
|
+
path: ["campaign/%1$s/installation", id],
|
|
25
|
+
model: GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown],
|
|
26
|
+
options: params[:request_options]
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Updates a program's installation configuration. Only the fields you send are
|
|
31
|
+
# changed. Unknown fields, fields not available for the program type, and invalid
|
|
32
|
+
# values return a `400`.
|
|
33
|
+
#
|
|
34
|
+
# The request body is a partial {CampaignInstallation} object — see the API
|
|
35
|
+
# reference for the full field list.
|
|
36
|
+
#
|
|
37
|
+
# @overload update(id, body, request_options: {})
|
|
38
|
+
#
|
|
39
|
+
# @param id [String] GrowSurf program ID.
|
|
40
|
+
#
|
|
41
|
+
# @param body [Hash{Symbol=>Object}] Partial installation configuration to merge.
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
44
|
+
#
|
|
45
|
+
# @return [Hash{Symbol=>Object}]
|
|
46
|
+
def update(id, body, params = {})
|
|
47
|
+
@client.request(
|
|
48
|
+
method: :patch,
|
|
49
|
+
path: ["campaign/%1$s/installation", id],
|
|
50
|
+
body: body,
|
|
51
|
+
model: GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown],
|
|
52
|
+
options: params[:request_options]
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# @api private
|
|
57
|
+
#
|
|
58
|
+
# @param client [GrowsurfRuby::Client]
|
|
59
|
+
def initialize(client:)
|
|
60
|
+
@client = client
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|