growsurf-ruby 0.6.1 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/models/campaign/campaign_reward_list_response.rb +21 -0
- data/lib/growsurf_ruby/models/campaign/delete_reward_response.rb +26 -0
- data/lib/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rb +28 -0
- data/lib/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rb +24 -0
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +130 -0
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_response.rb +81 -0
- data/lib/growsurf_ruby/models/campaign/participant_trigger_referral_params.rb +19 -1
- data/lib/growsurf_ruby/models/campaign/reward.rb +166 -0
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +189 -0
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +182 -0
- data/lib/growsurf_ruby/models/campaign_create_params.rb +82 -0
- data/lib/growsurf_ruby/models/campaign_update_params.rb +112 -0
- data/lib/growsurf_ruby/models.rb +4 -0
- data/lib/growsurf_ruby/resources/campaign/participant.rb +98 -3
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +191 -0
- data/lib/growsurf_ruby/resources/campaign.rb +105 -0
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +12 -0
- data/rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi +41 -0
- data/rbi/growsurf_ruby/models/campaign/delete_reward_response.rbi +38 -0
- data/rbi/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rbi +48 -0
- data/rbi/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rbi +36 -0
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +234 -0
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_response.rbi +131 -0
- data/rbi/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbi +24 -1
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +252 -0
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +330 -0
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +281 -0
- data/rbi/growsurf_ruby/models/campaign_create_params.rbi +143 -0
- data/rbi/growsurf_ruby/models/campaign_update_params.rbi +193 -0
- data/rbi/growsurf_ruby/models.rbi +4 -0
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +94 -0
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +200 -0
- data/rbi/growsurf_ruby/resources/campaign.rbi +99 -0
- data/sig/growsurf_ruby/models/campaign/campaign_reward_list_response.rbs +18 -0
- data/sig/growsurf_ruby/models/campaign/delete_reward_response.rbs +17 -0
- data/sig/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rbs +20 -0
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +151 -0
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_response.rbs +75 -0
- data/sig/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbs +7 -1
- data/sig/growsurf_ruby/models/campaign/reward.rbs +131 -0
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +192 -0
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +182 -0
- data/sig/growsurf_ruby/models/campaign_create_params.rbs +88 -0
- data/sig/growsurf_ruby/models/campaign_update_params.rbs +119 -0
- data/sig/growsurf_ruby/models.rbs +4 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +28 -0
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +70 -0
- data/sig/growsurf_ruby/resources/campaign.rbs +35 -0
- metadata +38 -2
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type reward_create_params =
|
|
5
|
+
{
|
|
6
|
+
type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_,
|
|
7
|
+
commission_structure: GrowsurfRuby::CommissionStructure,
|
|
8
|
+
conversions_required: Integer,
|
|
9
|
+
coupon_code: String,
|
|
10
|
+
description: String,
|
|
11
|
+
image_url: String,
|
|
12
|
+
is_active: bool,
|
|
13
|
+
is_unlimited: bool,
|
|
14
|
+
is_visible: bool,
|
|
15
|
+
limit: Integer,
|
|
16
|
+
limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration,
|
|
17
|
+
metadata: ::Hash[Symbol, top],
|
|
18
|
+
next_milestone_prefix: String,
|
|
19
|
+
next_milestone_suffix: String,
|
|
20
|
+
number_of_winners: Integer,
|
|
21
|
+
order: Integer,
|
|
22
|
+
referral_coupon_code: String,
|
|
23
|
+
referral_description: String,
|
|
24
|
+
referred_reward_upfront: bool,
|
|
25
|
+
title: String
|
|
26
|
+
}
|
|
27
|
+
& GrowsurfRuby::Internal::Type::request_parameters
|
|
28
|
+
|
|
29
|
+
class RewardCreateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
30
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
31
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
32
|
+
|
|
33
|
+
attr_accessor type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_
|
|
34
|
+
|
|
35
|
+
attr_reader commission_structure: GrowsurfRuby::CommissionStructure?
|
|
36
|
+
|
|
37
|
+
def commission_structure=: (
|
|
38
|
+
GrowsurfRuby::CommissionStructure
|
|
39
|
+
) -> GrowsurfRuby::CommissionStructure
|
|
40
|
+
|
|
41
|
+
attr_reader conversions_required: Integer?
|
|
42
|
+
|
|
43
|
+
def conversions_required=: (Integer) -> Integer
|
|
44
|
+
|
|
45
|
+
attr_reader coupon_code: String?
|
|
46
|
+
|
|
47
|
+
def coupon_code=: (String) -> String
|
|
48
|
+
|
|
49
|
+
attr_reader description: String?
|
|
50
|
+
|
|
51
|
+
def description=: (String) -> String
|
|
52
|
+
|
|
53
|
+
attr_reader image_url: String?
|
|
54
|
+
|
|
55
|
+
def image_url=: (String) -> String
|
|
56
|
+
|
|
57
|
+
attr_reader is_active: bool?
|
|
58
|
+
|
|
59
|
+
def is_active=: (bool) -> bool
|
|
60
|
+
|
|
61
|
+
attr_reader is_unlimited: bool?
|
|
62
|
+
|
|
63
|
+
def is_unlimited=: (bool) -> bool
|
|
64
|
+
|
|
65
|
+
attr_reader is_visible: bool?
|
|
66
|
+
|
|
67
|
+
def is_visible=: (bool) -> bool
|
|
68
|
+
|
|
69
|
+
attr_reader limit: Integer?
|
|
70
|
+
|
|
71
|
+
def limit=: (Integer) -> Integer
|
|
72
|
+
|
|
73
|
+
attr_reader limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration?
|
|
74
|
+
|
|
75
|
+
def limit_duration=: (
|
|
76
|
+
GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration
|
|
77
|
+
) -> GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration
|
|
78
|
+
|
|
79
|
+
attr_reader metadata: ::Hash[Symbol, top]?
|
|
80
|
+
|
|
81
|
+
def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
82
|
+
|
|
83
|
+
attr_reader next_milestone_prefix: String?
|
|
84
|
+
|
|
85
|
+
def next_milestone_prefix=: (String) -> String
|
|
86
|
+
|
|
87
|
+
attr_reader next_milestone_suffix: String?
|
|
88
|
+
|
|
89
|
+
def next_milestone_suffix=: (String) -> String
|
|
90
|
+
|
|
91
|
+
attr_reader number_of_winners: Integer?
|
|
92
|
+
|
|
93
|
+
def number_of_winners=: (Integer) -> Integer
|
|
94
|
+
|
|
95
|
+
attr_reader order: Integer?
|
|
96
|
+
|
|
97
|
+
def order=: (Integer) -> Integer
|
|
98
|
+
|
|
99
|
+
attr_reader referral_coupon_code: String?
|
|
100
|
+
|
|
101
|
+
def referral_coupon_code=: (String) -> String
|
|
102
|
+
|
|
103
|
+
attr_reader referral_description: String?
|
|
104
|
+
|
|
105
|
+
def referral_description=: (String) -> String
|
|
106
|
+
|
|
107
|
+
attr_reader referred_reward_upfront: bool?
|
|
108
|
+
|
|
109
|
+
def referred_reward_upfront=: (bool) -> bool
|
|
110
|
+
|
|
111
|
+
attr_reader title: String?
|
|
112
|
+
|
|
113
|
+
def title=: (String) -> String
|
|
114
|
+
|
|
115
|
+
def initialize: (
|
|
116
|
+
type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_,
|
|
117
|
+
?commission_structure: GrowsurfRuby::CommissionStructure,
|
|
118
|
+
?conversions_required: Integer,
|
|
119
|
+
?coupon_code: String,
|
|
120
|
+
?description: String,
|
|
121
|
+
?image_url: String,
|
|
122
|
+
?is_active: bool,
|
|
123
|
+
?is_unlimited: bool,
|
|
124
|
+
?is_visible: bool,
|
|
125
|
+
?limit: Integer,
|
|
126
|
+
?limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration,
|
|
127
|
+
?metadata: ::Hash[Symbol, top],
|
|
128
|
+
?next_milestone_prefix: String,
|
|
129
|
+
?next_milestone_suffix: String,
|
|
130
|
+
?number_of_winners: Integer,
|
|
131
|
+
?order: Integer,
|
|
132
|
+
?referral_coupon_code: String,
|
|
133
|
+
?referral_description: String,
|
|
134
|
+
?referred_reward_upfront: bool,
|
|
135
|
+
?title: String,
|
|
136
|
+
?request_options: GrowsurfRuby::request_opts
|
|
137
|
+
) -> void
|
|
138
|
+
|
|
139
|
+
def to_hash: -> {
|
|
140
|
+
type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_,
|
|
141
|
+
commission_structure: GrowsurfRuby::CommissionStructure,
|
|
142
|
+
conversions_required: Integer,
|
|
143
|
+
coupon_code: String,
|
|
144
|
+
description: String,
|
|
145
|
+
image_url: String,
|
|
146
|
+
is_active: bool,
|
|
147
|
+
is_unlimited: bool,
|
|
148
|
+
is_visible: bool,
|
|
149
|
+
limit: Integer,
|
|
150
|
+
limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration,
|
|
151
|
+
metadata: ::Hash[Symbol, top],
|
|
152
|
+
next_milestone_prefix: String,
|
|
153
|
+
next_milestone_suffix: String,
|
|
154
|
+
number_of_winners: Integer,
|
|
155
|
+
order: Integer,
|
|
156
|
+
referral_coupon_code: String,
|
|
157
|
+
referral_description: String,
|
|
158
|
+
referred_reward_upfront: bool,
|
|
159
|
+
title: String,
|
|
160
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
type type_ =
|
|
164
|
+
:SINGLE_SIDED | :DOUBLE_SIDED | :MILESTONE | :LEADERBOARD | :AFFILIATE
|
|
165
|
+
|
|
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
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardCreateParams::type_]
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
|
|
179
|
+
|
|
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
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration]
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type reward_update_params =
|
|
5
|
+
{
|
|
6
|
+
id: String,
|
|
7
|
+
reward_id: String,
|
|
8
|
+
commission_structure: GrowsurfRuby::CommissionStructure,
|
|
9
|
+
conversions_required: Integer,
|
|
10
|
+
coupon_code: String,
|
|
11
|
+
description: String,
|
|
12
|
+
image_url: String,
|
|
13
|
+
is_active: bool,
|
|
14
|
+
is_unlimited: bool,
|
|
15
|
+
is_visible: bool,
|
|
16
|
+
limit: Integer,
|
|
17
|
+
limit_duration: GrowsurfRuby::Models::Campaign::RewardUpdateParams::limit_duration,
|
|
18
|
+
metadata: ::Hash[Symbol, top],
|
|
19
|
+
next_milestone_prefix: String,
|
|
20
|
+
next_milestone_suffix: String,
|
|
21
|
+
number_of_winners: Integer,
|
|
22
|
+
order: Integer,
|
|
23
|
+
referral_coupon_code: String,
|
|
24
|
+
referral_description: String,
|
|
25
|
+
referred_reward_upfront: bool,
|
|
26
|
+
title: String
|
|
27
|
+
}
|
|
28
|
+
& GrowsurfRuby::Internal::Type::request_parameters
|
|
29
|
+
|
|
30
|
+
class RewardUpdateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
31
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
32
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
33
|
+
|
|
34
|
+
attr_accessor id: String
|
|
35
|
+
|
|
36
|
+
attr_accessor reward_id: String
|
|
37
|
+
|
|
38
|
+
attr_reader commission_structure: GrowsurfRuby::CommissionStructure?
|
|
39
|
+
|
|
40
|
+
def commission_structure=: (
|
|
41
|
+
GrowsurfRuby::CommissionStructure
|
|
42
|
+
) -> GrowsurfRuby::CommissionStructure
|
|
43
|
+
|
|
44
|
+
attr_reader conversions_required: Integer?
|
|
45
|
+
|
|
46
|
+
def conversions_required=: (Integer) -> Integer
|
|
47
|
+
|
|
48
|
+
attr_reader coupon_code: String?
|
|
49
|
+
|
|
50
|
+
def coupon_code=: (String) -> String
|
|
51
|
+
|
|
52
|
+
attr_reader description: String?
|
|
53
|
+
|
|
54
|
+
def description=: (String) -> String
|
|
55
|
+
|
|
56
|
+
attr_reader image_url: String?
|
|
57
|
+
|
|
58
|
+
def image_url=: (String) -> String
|
|
59
|
+
|
|
60
|
+
attr_reader is_active: bool?
|
|
61
|
+
|
|
62
|
+
def is_active=: (bool) -> bool
|
|
63
|
+
|
|
64
|
+
attr_reader is_unlimited: bool?
|
|
65
|
+
|
|
66
|
+
def is_unlimited=: (bool) -> bool
|
|
67
|
+
|
|
68
|
+
attr_reader is_visible: bool?
|
|
69
|
+
|
|
70
|
+
def is_visible=: (bool) -> bool
|
|
71
|
+
|
|
72
|
+
attr_reader limit: Integer?
|
|
73
|
+
|
|
74
|
+
def limit=: (Integer) -> Integer
|
|
75
|
+
|
|
76
|
+
attr_reader limit_duration: GrowsurfRuby::Models::Campaign::RewardUpdateParams::limit_duration?
|
|
77
|
+
|
|
78
|
+
def limit_duration=: (
|
|
79
|
+
GrowsurfRuby::Models::Campaign::RewardUpdateParams::limit_duration
|
|
80
|
+
) -> GrowsurfRuby::Models::Campaign::RewardUpdateParams::limit_duration
|
|
81
|
+
|
|
82
|
+
attr_reader metadata: ::Hash[Symbol, top]?
|
|
83
|
+
|
|
84
|
+
def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
85
|
+
|
|
86
|
+
attr_reader next_milestone_prefix: String?
|
|
87
|
+
|
|
88
|
+
def next_milestone_prefix=: (String) -> String
|
|
89
|
+
|
|
90
|
+
attr_reader next_milestone_suffix: String?
|
|
91
|
+
|
|
92
|
+
def next_milestone_suffix=: (String) -> String
|
|
93
|
+
|
|
94
|
+
attr_reader number_of_winners: Integer?
|
|
95
|
+
|
|
96
|
+
def number_of_winners=: (Integer) -> Integer
|
|
97
|
+
|
|
98
|
+
attr_reader order: Integer?
|
|
99
|
+
|
|
100
|
+
def order=: (Integer) -> Integer
|
|
101
|
+
|
|
102
|
+
attr_reader referral_coupon_code: String?
|
|
103
|
+
|
|
104
|
+
def referral_coupon_code=: (String) -> String
|
|
105
|
+
|
|
106
|
+
attr_reader referral_description: String?
|
|
107
|
+
|
|
108
|
+
def referral_description=: (String) -> String
|
|
109
|
+
|
|
110
|
+
attr_reader referred_reward_upfront: bool?
|
|
111
|
+
|
|
112
|
+
def referred_reward_upfront=: (bool) -> bool
|
|
113
|
+
|
|
114
|
+
attr_reader title: String?
|
|
115
|
+
|
|
116
|
+
def title=: (String) -> String
|
|
117
|
+
|
|
118
|
+
def initialize: (
|
|
119
|
+
id: String,
|
|
120
|
+
reward_id: String,
|
|
121
|
+
?commission_structure: GrowsurfRuby::CommissionStructure,
|
|
122
|
+
?conversions_required: Integer,
|
|
123
|
+
?coupon_code: String,
|
|
124
|
+
?description: String,
|
|
125
|
+
?image_url: String,
|
|
126
|
+
?is_active: bool,
|
|
127
|
+
?is_unlimited: bool,
|
|
128
|
+
?is_visible: bool,
|
|
129
|
+
?limit: Integer,
|
|
130
|
+
?limit_duration: GrowsurfRuby::Models::Campaign::RewardUpdateParams::limit_duration,
|
|
131
|
+
?metadata: ::Hash[Symbol, top],
|
|
132
|
+
?next_milestone_prefix: String,
|
|
133
|
+
?next_milestone_suffix: String,
|
|
134
|
+
?number_of_winners: Integer,
|
|
135
|
+
?order: Integer,
|
|
136
|
+
?referral_coupon_code: String,
|
|
137
|
+
?referral_description: String,
|
|
138
|
+
?referred_reward_upfront: bool,
|
|
139
|
+
?title: String,
|
|
140
|
+
?request_options: GrowsurfRuby::request_opts
|
|
141
|
+
) -> void
|
|
142
|
+
|
|
143
|
+
def to_hash: -> {
|
|
144
|
+
id: String,
|
|
145
|
+
reward_id: String,
|
|
146
|
+
commission_structure: GrowsurfRuby::CommissionStructure,
|
|
147
|
+
conversions_required: Integer,
|
|
148
|
+
coupon_code: String,
|
|
149
|
+
description: String,
|
|
150
|
+
image_url: String,
|
|
151
|
+
is_active: bool,
|
|
152
|
+
is_unlimited: bool,
|
|
153
|
+
is_visible: bool,
|
|
154
|
+
limit: Integer,
|
|
155
|
+
limit_duration: GrowsurfRuby::Models::Campaign::RewardUpdateParams::limit_duration,
|
|
156
|
+
metadata: ::Hash[Symbol, top],
|
|
157
|
+
next_milestone_prefix: String,
|
|
158
|
+
next_milestone_suffix: String,
|
|
159
|
+
number_of_winners: Integer,
|
|
160
|
+
order: Integer,
|
|
161
|
+
referral_coupon_code: String,
|
|
162
|
+
referral_description: String,
|
|
163
|
+
referred_reward_upfront: bool,
|
|
164
|
+
title: String,
|
|
165
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
|
|
169
|
+
|
|
170
|
+
module LimitDuration
|
|
171
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
172
|
+
|
|
173
|
+
IN_TOTAL: :IN_TOTAL
|
|
174
|
+
PER_MONTH: :PER_MONTH
|
|
175
|
+
PER_YEAR: :PER_YEAR
|
|
176
|
+
|
|
177
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardUpdateParams::limit_duration]
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type campaign_create_params =
|
|
4
|
+
{
|
|
5
|
+
type: GrowsurfRuby::Models::CampaignCreateParams::type_,
|
|
6
|
+
company_logo_image_url: String,
|
|
7
|
+
company_name: String,
|
|
8
|
+
currency_iso: String,
|
|
9
|
+
goal: String,
|
|
10
|
+
name: String,
|
|
11
|
+
options: ::Hash[Symbol, top],
|
|
12
|
+
rewards: ::Array[GrowsurfRuby::Campaign::RewardCreateParams]
|
|
13
|
+
}
|
|
14
|
+
& GrowsurfRuby::Internal::Type::request_parameters
|
|
15
|
+
|
|
16
|
+
class CampaignCreateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
17
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
18
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
19
|
+
|
|
20
|
+
attr_accessor type: GrowsurfRuby::Models::CampaignCreateParams::type_
|
|
21
|
+
|
|
22
|
+
attr_reader company_logo_image_url: String?
|
|
23
|
+
|
|
24
|
+
def company_logo_image_url=: (String) -> String
|
|
25
|
+
|
|
26
|
+
attr_reader company_name: String?
|
|
27
|
+
|
|
28
|
+
def company_name=: (String) -> String
|
|
29
|
+
|
|
30
|
+
attr_reader currency_iso: String?
|
|
31
|
+
|
|
32
|
+
def currency_iso=: (String) -> String
|
|
33
|
+
|
|
34
|
+
attr_reader goal: String?
|
|
35
|
+
|
|
36
|
+
def goal=: (String) -> String
|
|
37
|
+
|
|
38
|
+
attr_reader name: String?
|
|
39
|
+
|
|
40
|
+
def name=: (String) -> String
|
|
41
|
+
|
|
42
|
+
attr_reader options: ::Hash[Symbol, top]?
|
|
43
|
+
|
|
44
|
+
def options=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
45
|
+
|
|
46
|
+
attr_reader rewards: ::Array[GrowsurfRuby::Campaign::RewardCreateParams]?
|
|
47
|
+
|
|
48
|
+
def rewards=: (
|
|
49
|
+
::Array[GrowsurfRuby::Campaign::RewardCreateParams]
|
|
50
|
+
) -> ::Array[GrowsurfRuby::Campaign::RewardCreateParams]
|
|
51
|
+
|
|
52
|
+
def initialize: (
|
|
53
|
+
type: GrowsurfRuby::Models::CampaignCreateParams::type_,
|
|
54
|
+
?company_logo_image_url: String,
|
|
55
|
+
?company_name: String,
|
|
56
|
+
?currency_iso: String,
|
|
57
|
+
?goal: String,
|
|
58
|
+
?name: String,
|
|
59
|
+
?options: ::Hash[Symbol, top],
|
|
60
|
+
?rewards: ::Array[GrowsurfRuby::Campaign::RewardCreateParams],
|
|
61
|
+
?request_options: GrowsurfRuby::request_opts
|
|
62
|
+
) -> void
|
|
63
|
+
|
|
64
|
+
def to_hash: -> {
|
|
65
|
+
type: GrowsurfRuby::Models::CampaignCreateParams::type_,
|
|
66
|
+
company_logo_image_url: String,
|
|
67
|
+
company_name: String,
|
|
68
|
+
currency_iso: String,
|
|
69
|
+
goal: String,
|
|
70
|
+
name: String,
|
|
71
|
+
options: ::Hash[Symbol, top],
|
|
72
|
+
rewards: ::Array[GrowsurfRuby::Campaign::RewardCreateParams],
|
|
73
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
type type_ = :REFERRAL | :AFFILIATE
|
|
77
|
+
|
|
78
|
+
module Type
|
|
79
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
80
|
+
|
|
81
|
+
REFERRAL: :REFERRAL
|
|
82
|
+
AFFILIATE: :AFFILIATE
|
|
83
|
+
|
|
84
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::CampaignCreateParams::type_]
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type campaign_update_params =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
company_logo_image_url: String,
|
|
7
|
+
company_name: String,
|
|
8
|
+
currency_iso: String,
|
|
9
|
+
design: ::Hash[Symbol, top],
|
|
10
|
+
emails: ::Hash[Symbol, top],
|
|
11
|
+
goal: String,
|
|
12
|
+
installation: ::Hash[Symbol, top],
|
|
13
|
+
name: String,
|
|
14
|
+
notifications: ::Hash[Symbol, top],
|
|
15
|
+
options: ::Hash[Symbol, top],
|
|
16
|
+
status: GrowsurfRuby::Models::CampaignUpdateParams::status
|
|
17
|
+
}
|
|
18
|
+
& GrowsurfRuby::Internal::Type::request_parameters
|
|
19
|
+
|
|
20
|
+
class CampaignUpdateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
21
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
22
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
23
|
+
|
|
24
|
+
attr_accessor id: String
|
|
25
|
+
|
|
26
|
+
attr_reader company_logo_image_url: String?
|
|
27
|
+
|
|
28
|
+
def company_logo_image_url=: (String) -> String
|
|
29
|
+
|
|
30
|
+
attr_reader company_name: String?
|
|
31
|
+
|
|
32
|
+
def company_name=: (String) -> String
|
|
33
|
+
|
|
34
|
+
attr_reader currency_iso: String?
|
|
35
|
+
|
|
36
|
+
def currency_iso=: (String) -> String
|
|
37
|
+
|
|
38
|
+
attr_reader design: ::Hash[Symbol, top]?
|
|
39
|
+
|
|
40
|
+
def design=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
41
|
+
|
|
42
|
+
attr_reader emails: ::Hash[Symbol, top]?
|
|
43
|
+
|
|
44
|
+
def emails=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
45
|
+
|
|
46
|
+
attr_reader goal: String?
|
|
47
|
+
|
|
48
|
+
def goal=: (String) -> String
|
|
49
|
+
|
|
50
|
+
attr_reader installation: ::Hash[Symbol, top]?
|
|
51
|
+
|
|
52
|
+
def installation=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
53
|
+
|
|
54
|
+
attr_reader name: String?
|
|
55
|
+
|
|
56
|
+
def name=: (String) -> String
|
|
57
|
+
|
|
58
|
+
attr_reader notifications: ::Hash[Symbol, top]?
|
|
59
|
+
|
|
60
|
+
def notifications=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
61
|
+
|
|
62
|
+
attr_reader options: ::Hash[Symbol, top]?
|
|
63
|
+
|
|
64
|
+
def options=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
65
|
+
|
|
66
|
+
attr_reader status: GrowsurfRuby::Models::CampaignUpdateParams::status?
|
|
67
|
+
|
|
68
|
+
def status=: (
|
|
69
|
+
GrowsurfRuby::Models::CampaignUpdateParams::status
|
|
70
|
+
) -> GrowsurfRuby::Models::CampaignUpdateParams::status
|
|
71
|
+
|
|
72
|
+
def initialize: (
|
|
73
|
+
id: String,
|
|
74
|
+
?company_logo_image_url: String,
|
|
75
|
+
?company_name: String,
|
|
76
|
+
?currency_iso: String,
|
|
77
|
+
?design: ::Hash[Symbol, top],
|
|
78
|
+
?emails: ::Hash[Symbol, top],
|
|
79
|
+
?goal: String,
|
|
80
|
+
?installation: ::Hash[Symbol, top],
|
|
81
|
+
?name: String,
|
|
82
|
+
?notifications: ::Hash[Symbol, top],
|
|
83
|
+
?options: ::Hash[Symbol, top],
|
|
84
|
+
?status: GrowsurfRuby::Models::CampaignUpdateParams::status,
|
|
85
|
+
?request_options: GrowsurfRuby::request_opts
|
|
86
|
+
) -> void
|
|
87
|
+
|
|
88
|
+
def to_hash: -> {
|
|
89
|
+
id: String,
|
|
90
|
+
company_logo_image_url: String,
|
|
91
|
+
company_name: String,
|
|
92
|
+
currency_iso: String,
|
|
93
|
+
design: ::Hash[Symbol, top],
|
|
94
|
+
emails: ::Hash[Symbol, top],
|
|
95
|
+
goal: String,
|
|
96
|
+
installation: ::Hash[Symbol, top],
|
|
97
|
+
name: String,
|
|
98
|
+
notifications: ::Hash[Symbol, top],
|
|
99
|
+
options: ::Hash[Symbol, top],
|
|
100
|
+
status: GrowsurfRuby::Models::CampaignUpdateParams::status,
|
|
101
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
type status = :DRAFT | :PENDING | :IN_PROGRESS | :COMPLETE | :CANCELLED
|
|
105
|
+
|
|
106
|
+
module Status
|
|
107
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
108
|
+
|
|
109
|
+
DRAFT: :DRAFT
|
|
110
|
+
PENDING: :PENDING
|
|
111
|
+
IN_PROGRESS: :IN_PROGRESS
|
|
112
|
+
COMPLETE: :COMPLETE
|
|
113
|
+
CANCELLED: :CANCELLED
|
|
114
|
+
|
|
115
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::CampaignUpdateParams::status]
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
@@ -5,6 +5,8 @@ module GrowsurfRuby
|
|
|
5
5
|
|
|
6
6
|
class CampaignCreateMobileParticipantTokenParams = GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenParams
|
|
7
7
|
|
|
8
|
+
class CampaignCreateParams = GrowsurfRuby::Models::CampaignCreateParams
|
|
9
|
+
|
|
8
10
|
class CampaignListCommissionsParams = GrowsurfRuby::Models::CampaignListCommissionsParams
|
|
9
11
|
|
|
10
12
|
class CampaignListLeaderboardParams = GrowsurfRuby::Models::CampaignListLeaderboardParams
|
|
@@ -21,6 +23,8 @@ module GrowsurfRuby
|
|
|
21
23
|
|
|
22
24
|
class CampaignRetrieveParams = GrowsurfRuby::Models::CampaignRetrieveParams
|
|
23
25
|
|
|
26
|
+
class CampaignUpdateParams = GrowsurfRuby::Models::CampaignUpdateParams
|
|
27
|
+
|
|
24
28
|
class CommissionStructure = GrowsurfRuby::Models::CommissionStructure
|
|
25
29
|
|
|
26
30
|
class ParticipantCommissionList = GrowsurfRuby::Models::ParticipantCommissionList
|
|
@@ -112,6 +112,27 @@ module GrowsurfRuby
|
|
|
112
112
|
?request_options: GrowsurfRuby::request_opts
|
|
113
113
|
) -> GrowsurfRuby::Models::Campaign::participant_record_transaction_response
|
|
114
114
|
|
|
115
|
+
def refund_transaction: (
|
|
116
|
+
String participant_id_or_email,
|
|
117
|
+
id: String,
|
|
118
|
+
?amendment_type: GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::amendment_type,
|
|
119
|
+
?amount: Integer,
|
|
120
|
+
?amount_refunded: Integer,
|
|
121
|
+
?charge_id: String,
|
|
122
|
+
?currency: String,
|
|
123
|
+
?description: String,
|
|
124
|
+
?external_id: String,
|
|
125
|
+
?invoice_id: String,
|
|
126
|
+
?order_id: String,
|
|
127
|
+
?payment_id: String,
|
|
128
|
+
?payment_intent_id: String,
|
|
129
|
+
?refund_amount: Integer,
|
|
130
|
+
?refund_id: String,
|
|
131
|
+
?refund_status: String,
|
|
132
|
+
?transaction_id: String,
|
|
133
|
+
?request_options: GrowsurfRuby::request_opts
|
|
134
|
+
) -> GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse
|
|
135
|
+
|
|
115
136
|
def send_invites: (
|
|
116
137
|
String participant_id_or_email,
|
|
117
138
|
id: String,
|
|
@@ -124,9 +145,16 @@ module GrowsurfRuby
|
|
|
124
145
|
def trigger_referral: (
|
|
125
146
|
String participant_id_or_email,
|
|
126
147
|
id: String,
|
|
148
|
+
?delay_in_days: Integer,
|
|
127
149
|
?request_options: GrowsurfRuby::request_opts
|
|
128
150
|
) -> GrowsurfRuby::Models::Campaign::ParticipantTriggerReferralResponse
|
|
129
151
|
|
|
152
|
+
def cancel_delayed_referral: (
|
|
153
|
+
String participant_id_or_email,
|
|
154
|
+
id: String,
|
|
155
|
+
?request_options: GrowsurfRuby::request_opts
|
|
156
|
+
) -> GrowsurfRuby::Models::Campaign::ParticipantCancelDelayedReferralResponse
|
|
157
|
+
|
|
130
158
|
def initialize: (client: GrowsurfRuby::Client) -> void
|
|
131
159
|
end
|
|
132
160
|
end
|