growsurf-ruby 1.3.0 → 1.5.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 (142) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +10 -7
  4. data/lib/growsurf_ruby/internal/transport/base_client.rb +6 -1
  5. data/lib/growsurf_ruby/internal/type/base_model.rb +26 -0
  6. data/lib/growsurf_ruby/internal/type/base_page.rb +6 -0
  7. data/lib/growsurf_ruby/models/account_create_response.rb +3 -3
  8. data/lib/growsurf_ruby/models/analytics_availability.rb +16 -0
  9. data/lib/growsurf_ruby/models/analytics_unavailable_reason.rb +20 -0
  10. data/lib/growsurf_ruby/models/campaign/delete_program_resource_response.rb +12 -0
  11. data/lib/growsurf_ruby/models/campaign/integration.rb +69 -0
  12. data/lib/growsurf_ruby/models/campaign/integration_list_response.rb +24 -0
  13. data/lib/growsurf_ruby/models/campaign/participant_activation_analytics.rb +75 -0
  14. data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +11 -0
  15. data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rb +17 -17
  16. data/lib/growsurf_ruby/models/campaign/participant_record_transaction_params.rb +9 -1
  17. data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +17 -1
  18. data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rb +8 -8
  19. data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +15 -11
  20. data/lib/growsurf_ruby/models/campaign/participant_reward.rb +16 -3
  21. data/lib/growsurf_ruby/models/campaign/program_resource.rb +51 -0
  22. data/lib/growsurf_ruby/models/campaign/program_resource_create_params.rb +32 -0
  23. data/lib/growsurf_ruby/models/campaign/program_resource_delete_params.rb +14 -0
  24. data/lib/growsurf_ruby/models/campaign/program_resource_list_response.rb +12 -0
  25. data/lib/growsurf_ruby/models/campaign/program_resource_update_params.rb +35 -0
  26. data/lib/growsurf_ruby/models/campaign/program_resource_upload_result.rb +33 -0
  27. data/lib/growsurf_ruby/models/campaign/program_resource_upload_ticket.rb +26 -0
  28. data/lib/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rb +17 -0
  29. data/lib/growsurf_ruby/models/campaign/reward.rb +22 -1
  30. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +32 -9
  31. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +32 -9
  32. data/lib/growsurf_ruby/models/campaign.rb +25 -2
  33. data/lib/growsurf_ruby/models/campaign_activation_analytics_response.rb +186 -0
  34. data/lib/growsurf_ruby/models/campaign_create_params.rb +37 -1
  35. data/lib/growsurf_ruby/models/campaign_engagement_analytics.rb +174 -0
  36. data/lib/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rb +35 -0
  37. data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +37 -4
  38. data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +3 -0
  39. data/lib/growsurf_ruby/models/commission_structure.rb +19 -3
  40. data/lib/growsurf_ruby/models/participant_commission_list.rb +24 -6
  41. data/lib/growsurf_ruby/models/participant_payout_list.rb +5 -5
  42. data/lib/growsurf_ruby/models.rb +7 -0
  43. data/lib/growsurf_ruby/resources/account.rb +17 -11
  44. data/lib/growsurf_ruby/resources/campaign/design.rb +11 -5
  45. data/lib/growsurf_ruby/resources/campaign/emails.rb +2 -1
  46. data/lib/growsurf_ruby/resources/campaign/integrations.rb +41 -0
  47. data/lib/growsurf_ruby/resources/campaign/participant.rb +28 -25
  48. data/lib/growsurf_ruby/resources/campaign/program_resources.rb +112 -0
  49. data/lib/growsurf_ruby/resources/campaign/rewards.rb +12 -6
  50. data/lib/growsurf_ruby/resources/campaign.rb +53 -7
  51. data/lib/growsurf_ruby/resources/team.rb +7 -5
  52. data/lib/growsurf_ruby/version.rb +1 -1
  53. data/lib/growsurf_ruby.rb +19 -0
  54. data/rbi/growsurf_ruby/internal/type/base_model.rbi +10 -0
  55. data/rbi/growsurf_ruby/internal/type/base_page.rbi +3 -0
  56. data/rbi/growsurf_ruby/models/analytics_availability.rbi +19 -0
  57. data/rbi/growsurf_ruby/models/analytics_unavailable_reason.rbi +23 -0
  58. data/rbi/growsurf_ruby/models/campaign/delete_program_resource_response.rbi +33 -0
  59. data/rbi/growsurf_ruby/models/campaign/integration.rbi +93 -0
  60. data/rbi/growsurf_ruby/models/campaign/integration_list_response.rbi +46 -0
  61. data/rbi/growsurf_ruby/models/campaign/participant_activation_analytics.rbi +133 -0
  62. data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +35 -0
  63. data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbi +17 -23
  64. data/rbi/growsurf_ruby/models/campaign/participant_record_transaction_params.rbi +18 -0
  65. data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +18 -0
  66. data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbi +7 -9
  67. data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +16 -10
  68. data/rbi/growsurf_ruby/models/campaign/participant_reward.rbi +29 -6
  69. data/rbi/growsurf_ruby/models/campaign/program_resource.rbi +186 -0
  70. data/rbi/growsurf_ruby/models/campaign/program_resource_create_params.rbi +95 -0
  71. data/rbi/growsurf_ruby/models/campaign/program_resource_delete_params.rbi +37 -0
  72. data/rbi/growsurf_ruby/models/campaign/program_resource_list_response.rbi +29 -0
  73. data/rbi/growsurf_ruby/models/campaign/program_resource_update_params.rbi +105 -0
  74. data/rbi/growsurf_ruby/models/campaign/program_resource_upload_result.rbi +94 -0
  75. data/rbi/growsurf_ruby/models/campaign/program_resource_upload_ticket.rbi +57 -0
  76. data/rbi/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rbi +53 -0
  77. data/rbi/growsurf_ruby/models/campaign/reward.rbi +55 -0
  78. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +97 -24
  79. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +97 -24
  80. data/rbi/growsurf_ruby/models/campaign.rbi +52 -3
  81. data/rbi/growsurf_ruby/models/campaign_activation_analytics_response.rbi +325 -0
  82. data/rbi/growsurf_ruby/models/campaign_create_params.rbi +91 -0
  83. data/rbi/growsurf_ruby/models/campaign_engagement_analytics.rbi +369 -0
  84. data/rbi/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rbi +59 -0
  85. data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +56 -3
  86. data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +27 -7
  87. data/rbi/growsurf_ruby/models/commission_structure.rbi +36 -3
  88. data/rbi/growsurf_ruby/models/participant_commission_list.rbi +63 -15
  89. data/rbi/growsurf_ruby/models/participant_payout_list.rbi +15 -15
  90. data/rbi/growsurf_ruby/models.rbi +7 -0
  91. data/rbi/growsurf_ruby/resources/account.rbi +9 -6
  92. data/rbi/growsurf_ruby/resources/campaign/design.rbi +32 -4
  93. data/rbi/growsurf_ruby/resources/campaign/emails.rbi +2 -1
  94. data/rbi/growsurf_ruby/resources/campaign/integrations.rbi +35 -0
  95. data/rbi/growsurf_ruby/resources/campaign/participant.rbi +38 -24
  96. data/rbi/growsurf_ruby/resources/campaign/program_resources.rbi +116 -0
  97. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +35 -16
  98. data/rbi/growsurf_ruby/resources/campaign.rbi +53 -5
  99. data/rbi/growsurf_ruby/resources/team.rbi +7 -5
  100. data/sig/growsurf_ruby/internal/type/base_model.rbs +6 -0
  101. data/sig/growsurf_ruby/internal/type/base_page.rbs +2 -0
  102. data/sig/growsurf_ruby/models/analytics_availability.rbs +15 -0
  103. data/sig/growsurf_ruby/models/analytics_unavailable_reason.rbs +26 -0
  104. data/sig/growsurf_ruby/models/campaign/delete_program_resource_response.rbs +14 -0
  105. data/sig/growsurf_ruby/models/campaign/integration.rbs +47 -0
  106. data/sig/growsurf_ruby/models/campaign/integration_list_response.rbs +20 -0
  107. data/sig/growsurf_ruby/models/campaign/participant_activation_analytics.rbs +96 -0
  108. data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +22 -1
  109. data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbs +17 -22
  110. data/sig/growsurf_ruby/models/campaign/participant_record_transaction_params.rbs +15 -1
  111. data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +15 -1
  112. data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbs +8 -10
  113. data/sig/growsurf_ruby/models/campaign/participant_reward.rbs +24 -9
  114. data/sig/growsurf_ruby/models/campaign/program_resource.rbs +94 -0
  115. data/sig/growsurf_ruby/models/campaign/program_resource_create_params.rbs +45 -0
  116. data/sig/growsurf_ruby/models/campaign/program_resource_delete_params.rbs +22 -0
  117. data/sig/growsurf_ruby/models/campaign/program_resource_list_response.rbs +14 -0
  118. data/sig/growsurf_ruby/models/campaign/program_resource_update_params.rbs +48 -0
  119. data/sig/growsurf_ruby/models/campaign/program_resource_upload_result.rbs +58 -0
  120. data/sig/growsurf_ruby/models/campaign/program_resource_upload_ticket.rbs +29 -0
  121. data/sig/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rbs +29 -0
  122. data/sig/growsurf_ruby/models/campaign/reward.rbs +16 -0
  123. data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +54 -34
  124. data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +54 -34
  125. data/sig/growsurf_ruby/models/campaign.rbs +23 -5
  126. data/sig/growsurf_ruby/models/campaign_activation_analytics_response.rbs +202 -0
  127. data/sig/growsurf_ruby/models/campaign_create_params.rbs +29 -0
  128. data/sig/growsurf_ruby/models/campaign_engagement_analytics.rbs +186 -0
  129. data/sig/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rbs +45 -0
  130. data/sig/growsurf_ruby/models/campaign_retrieve_analytics_params.rbs +30 -1
  131. data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +21 -3
  132. data/sig/growsurf_ruby/models/commission_structure.rbs +16 -4
  133. data/sig/growsurf_ruby/models/participant_commission_list.rbs +36 -20
  134. data/sig/growsurf_ruby/models/participant_payout_list.rbs +20 -20
  135. data/sig/growsurf_ruby/models.rbs +6 -0
  136. data/sig/growsurf_ruby/resources/campaign/design.rbs +19 -0
  137. data/sig/growsurf_ruby/resources/campaign/integrations.rbs +14 -0
  138. data/sig/growsurf_ruby/resources/campaign/participant.rbs +4 -0
  139. data/sig/growsurf_ruby/resources/campaign/program_resources.rbs +58 -0
  140. data/sig/growsurf_ruby/resources/campaign/rewards.rbs +14 -12
  141. data/sig/growsurf_ruby/resources/campaign.rbs +17 -0
  142. metadata +59 -2
@@ -0,0 +1,29 @@
1
+ module GrowsurfRuby
2
+ module Models
3
+ module Campaign
4
+ type program_resource_upload_parameter = String | Integer | Float | bool
5
+
6
+ type program_resource_upload_ticket =
7
+ {
8
+ ticket: String,
9
+ expires_in: Integer,
10
+ upload_url: String,
11
+ upload_parameters: ::Hash[Symbol, program_resource_upload_parameter]
12
+ }
13
+
14
+ class ProgramResourceUploadTicket < GrowsurfRuby::Internal::Type::BaseModel
15
+ attr_accessor ticket: String
16
+ attr_accessor expires_in: Integer
17
+ attr_accessor upload_url: String
18
+ attr_accessor upload_parameters: ::Hash[Symbol, program_resource_upload_parameter]
19
+ def initialize: (
20
+ ticket: String,
21
+ expires_in: Integer,
22
+ upload_url: String,
23
+ upload_parameters: ::Hash[Symbol, program_resource_upload_parameter]
24
+ ) -> void
25
+ def to_hash: -> program_resource_upload_ticket
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,29 @@
1
+ module GrowsurfRuby
2
+ module Models
3
+ module Campaign
4
+ type program_resource_upload_ticket_params =
5
+ { file_name: String, mime_type: String, bytes: Integer }
6
+ & GrowsurfRuby::Internal::Type::request_parameters
7
+
8
+ class ProgramResourceUploadTicketParams < GrowsurfRuby::Internal::Type::BaseModel
9
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
10
+ include GrowsurfRuby::Internal::Type::RequestParameters
11
+ attr_accessor file_name: String
12
+ attr_accessor mime_type: String
13
+ attr_accessor bytes: Integer
14
+ def initialize: (
15
+ file_name: String,
16
+ mime_type: String,
17
+ bytes: Integer,
18
+ ?request_options: GrowsurfRuby::request_opts
19
+ ) -> void
20
+ def to_hash: -> {
21
+ file_name: String,
22
+ mime_type: String,
23
+ bytes: Integer,
24
+ request_options: GrowsurfRuby::RequestOptions
25
+ }
26
+ end
27
+ end
28
+ end
29
+ end
@@ -11,6 +11,7 @@ module GrowsurfRuby
11
11
  conversions_required: Integer?,
12
12
  coupon_code: String?,
13
13
  description: String?,
14
+ event: GrowsurfRuby::Models::Campaign::Reward::event?,
14
15
  image_url: String?,
15
16
  is_visible: bool,
16
17
  limit: Integer?,
@@ -44,6 +45,8 @@ module GrowsurfRuby
44
45
 
45
46
  attr_accessor description: String?
46
47
 
48
+ attr_accessor event: GrowsurfRuby::Models::Campaign::Reward::event?
49
+
47
50
  attr_accessor image_url: String?
48
51
 
49
52
  attr_reader is_visible: bool?
@@ -85,6 +88,7 @@ module GrowsurfRuby
85
88
  ?conversions_required: Integer?,
86
89
  ?coupon_code: String?,
87
90
  ?description: String?,
91
+ ?event: GrowsurfRuby::Models::Campaign::Reward::event?,
88
92
  ?image_url: String?,
89
93
  ?is_visible: bool,
90
94
  ?limit: Integer?,
@@ -110,6 +114,7 @@ module GrowsurfRuby
110
114
  conversions_required: Integer?,
111
115
  coupon_code: String?,
112
116
  description: String?,
117
+ event: GrowsurfRuby::Models::Campaign::Reward::event?,
113
118
  image_url: String?,
114
119
  is_visible: bool,
115
120
  limit: Integer?,
@@ -141,6 +146,17 @@ module GrowsurfRuby
141
146
  def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::Reward::type_]
142
147
  end
143
148
 
149
+ type event = :LEAD | :CONVERSION
150
+
151
+ module Event
152
+ extend GrowsurfRuby::Internal::Type::Enum
153
+
154
+ LEAD: :LEAD
155
+ CONVERSION: :CONVERSION
156
+
157
+ def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::Reward::event]
158
+ end
159
+
144
160
  type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
145
161
 
146
162
  module LimitDuration
@@ -6,24 +6,25 @@ module GrowsurfRuby
6
6
  type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_,
7
7
  commission_structure: GrowsurfRuby::CommissionStructure,
8
8
  conversions_required: Integer,
9
- coupon_code: String,
9
+ coupon_code: String?,
10
10
  description: String,
11
- image_url: String,
11
+ event: GrowsurfRuby::Models::Campaign::RewardCreateParams::event,
12
+ image_url: String?,
12
13
  is_unlimited: bool,
13
14
  is_visible: bool,
14
15
  limit: Integer,
15
16
  limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration,
16
17
  metadata: ::Hash[Symbol, top],
17
- next_milestone_prefix: String,
18
- next_milestone_suffix: String,
18
+ next_milestone_prefix: String?,
19
+ next_milestone_suffix: String?,
19
20
  number_of_winners: Integer,
20
21
  order: Integer,
21
- referral_coupon_code: String,
22
- referral_description: String,
22
+ referral_coupon_code: String?,
23
+ referral_description: String?,
23
24
  referred_reward_upfront: bool,
24
- referred_value: GrowsurfRuby::RewardTaxValuation,
25
+ referred_value: GrowsurfRuby::RewardTaxValuation?,
25
26
  title: String,
26
- value: GrowsurfRuby::RewardTaxValuation
27
+ value: GrowsurfRuby::RewardTaxValuation?
27
28
  }
28
29
  & GrowsurfRuby::Internal::Type::request_parameters
29
30
 
@@ -45,15 +46,21 @@ module GrowsurfRuby
45
46
 
46
47
  attr_reader coupon_code: String?
47
48
 
48
- def coupon_code=: (String) -> String
49
+ def coupon_code=: (String?) -> String?
49
50
 
50
51
  attr_reader description: String?
51
52
 
52
53
  def description=: (String) -> String
53
54
 
55
+ attr_reader event: GrowsurfRuby::Models::Campaign::RewardCreateParams::event?
56
+
57
+ def event=: (
58
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::event
59
+ ) -> GrowsurfRuby::Models::Campaign::RewardCreateParams::event
60
+
54
61
  attr_reader image_url: String?
55
62
 
56
- def image_url=: (String) -> String
63
+ def image_url=: (String?) -> String?
57
64
 
58
65
  attr_reader is_unlimited: bool?
59
66
 
@@ -79,11 +86,11 @@ module GrowsurfRuby
79
86
 
80
87
  attr_reader next_milestone_prefix: String?
81
88
 
82
- def next_milestone_prefix=: (String) -> String
89
+ def next_milestone_prefix=: (String?) -> String?
83
90
 
84
91
  attr_reader next_milestone_suffix: String?
85
92
 
86
- def next_milestone_suffix=: (String) -> String
93
+ def next_milestone_suffix=: (String?) -> String?
87
94
 
88
95
  attr_reader number_of_winners: Integer?
89
96
 
@@ -95,11 +102,11 @@ module GrowsurfRuby
95
102
 
96
103
  attr_reader referral_coupon_code: String?
97
104
 
98
- def referral_coupon_code=: (String) -> String
105
+ def referral_coupon_code=: (String?) -> String?
99
106
 
100
107
  attr_reader referral_description: String?
101
108
 
102
- def referral_description=: (String) -> String
109
+ def referral_description=: (String?) -> String?
103
110
 
104
111
  attr_reader referred_reward_upfront: bool?
105
112
 
@@ -108,8 +115,8 @@ module GrowsurfRuby
108
115
  attr_reader referred_value: GrowsurfRuby::RewardTaxValuation?
109
116
 
110
117
  def referred_value=: (
111
- GrowsurfRuby::RewardTaxValuation
112
- ) -> GrowsurfRuby::RewardTaxValuation
118
+ GrowsurfRuby::RewardTaxValuation?
119
+ ) -> GrowsurfRuby::RewardTaxValuation?
113
120
 
114
121
  attr_reader title: String?
115
122
 
@@ -118,31 +125,32 @@ module GrowsurfRuby
118
125
  attr_reader value: GrowsurfRuby::RewardTaxValuation?
119
126
 
120
127
  def value=: (
121
- GrowsurfRuby::RewardTaxValuation
122
- ) -> GrowsurfRuby::RewardTaxValuation
128
+ GrowsurfRuby::RewardTaxValuation?
129
+ ) -> GrowsurfRuby::RewardTaxValuation?
123
130
 
124
131
  def initialize: (
125
132
  type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_,
126
133
  ?commission_structure: GrowsurfRuby::CommissionStructure,
127
134
  ?conversions_required: Integer,
128
- ?coupon_code: String,
135
+ ?coupon_code: String?,
129
136
  ?description: String,
130
- ?image_url: String,
137
+ ?event: GrowsurfRuby::Models::Campaign::RewardCreateParams::event,
138
+ ?image_url: String?,
131
139
  ?is_unlimited: bool,
132
140
  ?is_visible: bool,
133
141
  ?limit: Integer,
134
142
  ?limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration,
135
143
  ?metadata: ::Hash[Symbol, top],
136
- ?next_milestone_prefix: String,
137
- ?next_milestone_suffix: String,
144
+ ?next_milestone_prefix: String?,
145
+ ?next_milestone_suffix: String?,
138
146
  ?number_of_winners: Integer,
139
147
  ?order: Integer,
140
- ?referral_coupon_code: String,
141
- ?referral_description: String,
148
+ ?referral_coupon_code: String?,
149
+ ?referral_description: String?,
142
150
  ?referred_reward_upfront: bool,
143
- ?referred_value: GrowsurfRuby::RewardTaxValuation,
151
+ ?referred_value: GrowsurfRuby::RewardTaxValuation?,
144
152
  ?title: String,
145
- ?value: GrowsurfRuby::RewardTaxValuation,
153
+ ?value: GrowsurfRuby::RewardTaxValuation?,
146
154
  ?request_options: GrowsurfRuby::request_opts
147
155
  ) -> void
148
156
 
@@ -150,24 +158,25 @@ module GrowsurfRuby
150
158
  type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_,
151
159
  commission_structure: GrowsurfRuby::CommissionStructure,
152
160
  conversions_required: Integer,
153
- coupon_code: String,
161
+ coupon_code: String?,
154
162
  description: String,
155
- image_url: String,
163
+ event: GrowsurfRuby::Models::Campaign::RewardCreateParams::event,
164
+ image_url: String?,
156
165
  is_unlimited: bool,
157
166
  is_visible: bool,
158
167
  limit: Integer,
159
168
  limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration,
160
169
  metadata: ::Hash[Symbol, top],
161
- next_milestone_prefix: String,
162
- next_milestone_suffix: String,
170
+ next_milestone_prefix: String?,
171
+ next_milestone_suffix: String?,
163
172
  number_of_winners: Integer,
164
173
  order: Integer,
165
- referral_coupon_code: String,
166
- referral_description: String,
174
+ referral_coupon_code: String?,
175
+ referral_description: String?,
167
176
  referred_reward_upfront: bool,
168
- referred_value: GrowsurfRuby::RewardTaxValuation,
177
+ referred_value: GrowsurfRuby::RewardTaxValuation?,
169
178
  title: String,
170
- value: GrowsurfRuby::RewardTaxValuation,
179
+ value: GrowsurfRuby::RewardTaxValuation?,
171
180
  request_options: GrowsurfRuby::RequestOptions
172
181
  }
173
182
 
@@ -186,6 +195,17 @@ module GrowsurfRuby
186
195
  def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardCreateParams::type_]
187
196
  end
188
197
 
198
+ type event = :LEAD | :CONVERSION
199
+
200
+ module Event
201
+ extend GrowsurfRuby::Internal::Type::Enum
202
+
203
+ LEAD: :LEAD
204
+ CONVERSION: :CONVERSION
205
+
206
+ def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardCreateParams::event]
207
+ end
208
+
189
209
  type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
190
210
 
191
211
  module LimitDuration
@@ -7,24 +7,25 @@ module GrowsurfRuby
7
7
  campaign_reward_id: String,
8
8
  commission_structure: GrowsurfRuby::CommissionStructure,
9
9
  conversions_required: Integer,
10
- coupon_code: String,
10
+ coupon_code: String?,
11
11
  description: String,
12
- image_url: String,
12
+ event: GrowsurfRuby::Models::Campaign::RewardUpdateParams::event,
13
+ image_url: String?,
13
14
  is_unlimited: bool,
14
15
  is_visible: bool,
15
16
  limit: Integer,
16
17
  limit_duration: GrowsurfRuby::Models::Campaign::RewardUpdateParams::limit_duration,
17
18
  metadata: ::Hash[Symbol, top],
18
- next_milestone_prefix: String,
19
- next_milestone_suffix: String,
19
+ next_milestone_prefix: String?,
20
+ next_milestone_suffix: String?,
20
21
  number_of_winners: Integer,
21
22
  order: Integer,
22
- referral_coupon_code: String,
23
- referral_description: String,
23
+ referral_coupon_code: String?,
24
+ referral_description: String?,
24
25
  referred_reward_upfront: bool,
25
- referred_value: GrowsurfRuby::RewardTaxValuation,
26
+ referred_value: GrowsurfRuby::RewardTaxValuation?,
26
27
  title: String,
27
- value: GrowsurfRuby::RewardTaxValuation
28
+ value: GrowsurfRuby::RewardTaxValuation?
28
29
  }
29
30
  & GrowsurfRuby::Internal::Type::request_parameters
30
31
 
@@ -48,15 +49,21 @@ module GrowsurfRuby
48
49
 
49
50
  attr_reader coupon_code: String?
50
51
 
51
- def coupon_code=: (String) -> String
52
+ def coupon_code=: (String?) -> String?
52
53
 
53
54
  attr_reader description: String?
54
55
 
55
56
  def description=: (String) -> String
56
57
 
58
+ attr_reader event: GrowsurfRuby::Models::Campaign::RewardUpdateParams::event?
59
+
60
+ def event=: (
61
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::event
62
+ ) -> GrowsurfRuby::Models::Campaign::RewardUpdateParams::event
63
+
57
64
  attr_reader image_url: String?
58
65
 
59
- def image_url=: (String) -> String
66
+ def image_url=: (String?) -> String?
60
67
 
61
68
  attr_reader is_unlimited: bool?
62
69
 
@@ -82,11 +89,11 @@ module GrowsurfRuby
82
89
 
83
90
  attr_reader next_milestone_prefix: String?
84
91
 
85
- def next_milestone_prefix=: (String) -> String
92
+ def next_milestone_prefix=: (String?) -> String?
86
93
 
87
94
  attr_reader next_milestone_suffix: String?
88
95
 
89
- def next_milestone_suffix=: (String) -> String
96
+ def next_milestone_suffix=: (String?) -> String?
90
97
 
91
98
  attr_reader number_of_winners: Integer?
92
99
 
@@ -98,11 +105,11 @@ module GrowsurfRuby
98
105
 
99
106
  attr_reader referral_coupon_code: String?
100
107
 
101
- def referral_coupon_code=: (String) -> String
108
+ def referral_coupon_code=: (String?) -> String?
102
109
 
103
110
  attr_reader referral_description: String?
104
111
 
105
- def referral_description=: (String) -> String
112
+ def referral_description=: (String?) -> String?
106
113
 
107
114
  attr_reader referred_reward_upfront: bool?
108
115
 
@@ -111,8 +118,8 @@ module GrowsurfRuby
111
118
  attr_reader referred_value: GrowsurfRuby::RewardTaxValuation?
112
119
 
113
120
  def referred_value=: (
114
- GrowsurfRuby::RewardTaxValuation
115
- ) -> GrowsurfRuby::RewardTaxValuation
121
+ GrowsurfRuby::RewardTaxValuation?
122
+ ) -> GrowsurfRuby::RewardTaxValuation?
116
123
 
117
124
  attr_reader title: String?
118
125
 
@@ -121,32 +128,33 @@ module GrowsurfRuby
121
128
  attr_reader value: GrowsurfRuby::RewardTaxValuation?
122
129
 
123
130
  def value=: (
124
- GrowsurfRuby::RewardTaxValuation
125
- ) -> GrowsurfRuby::RewardTaxValuation
131
+ GrowsurfRuby::RewardTaxValuation?
132
+ ) -> GrowsurfRuby::RewardTaxValuation?
126
133
 
127
134
  def initialize: (
128
135
  id: String,
129
136
  campaign_reward_id: String,
130
137
  ?commission_structure: GrowsurfRuby::CommissionStructure,
131
138
  ?conversions_required: Integer,
132
- ?coupon_code: String,
139
+ ?coupon_code: String?,
133
140
  ?description: String,
134
- ?image_url: String,
141
+ ?event: GrowsurfRuby::Models::Campaign::RewardUpdateParams::event,
142
+ ?image_url: String?,
135
143
  ?is_unlimited: bool,
136
144
  ?is_visible: bool,
137
145
  ?limit: Integer,
138
146
  ?limit_duration: GrowsurfRuby::Models::Campaign::RewardUpdateParams::limit_duration,
139
147
  ?metadata: ::Hash[Symbol, top],
140
- ?next_milestone_prefix: String,
141
- ?next_milestone_suffix: String,
148
+ ?next_milestone_prefix: String?,
149
+ ?next_milestone_suffix: String?,
142
150
  ?number_of_winners: Integer,
143
151
  ?order: Integer,
144
- ?referral_coupon_code: String,
145
- ?referral_description: String,
152
+ ?referral_coupon_code: String?,
153
+ ?referral_description: String?,
146
154
  ?referred_reward_upfront: bool,
147
- ?referred_value: GrowsurfRuby::RewardTaxValuation,
155
+ ?referred_value: GrowsurfRuby::RewardTaxValuation?,
148
156
  ?title: String,
149
- ?value: GrowsurfRuby::RewardTaxValuation,
157
+ ?value: GrowsurfRuby::RewardTaxValuation?,
150
158
  ?request_options: GrowsurfRuby::request_opts
151
159
  ) -> void
152
160
 
@@ -155,27 +163,39 @@ module GrowsurfRuby
155
163
  campaign_reward_id: String,
156
164
  commission_structure: GrowsurfRuby::CommissionStructure,
157
165
  conversions_required: Integer,
158
- coupon_code: String,
166
+ coupon_code: String?,
159
167
  description: String,
160
- image_url: String,
168
+ event: GrowsurfRuby::Models::Campaign::RewardUpdateParams::event,
169
+ image_url: String?,
161
170
  is_unlimited: bool,
162
171
  is_visible: bool,
163
172
  limit: Integer,
164
173
  limit_duration: GrowsurfRuby::Models::Campaign::RewardUpdateParams::limit_duration,
165
174
  metadata: ::Hash[Symbol, top],
166
- next_milestone_prefix: String,
167
- next_milestone_suffix: String,
175
+ next_milestone_prefix: String?,
176
+ next_milestone_suffix: String?,
168
177
  number_of_winners: Integer,
169
178
  order: Integer,
170
- referral_coupon_code: String,
171
- referral_description: String,
179
+ referral_coupon_code: String?,
180
+ referral_description: String?,
172
181
  referred_reward_upfront: bool,
173
- referred_value: GrowsurfRuby::RewardTaxValuation,
182
+ referred_value: GrowsurfRuby::RewardTaxValuation?,
174
183
  title: String,
175
- value: GrowsurfRuby::RewardTaxValuation,
184
+ value: GrowsurfRuby::RewardTaxValuation?,
176
185
  request_options: GrowsurfRuby::RequestOptions
177
186
  }
178
187
 
188
+ type event = :LEAD | :CONVERSION
189
+
190
+ module Event
191
+ extend GrowsurfRuby::Internal::Type::Enum
192
+
193
+ LEAD: :LEAD
194
+ CONVERSION: :CONVERSION
195
+
196
+ def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardUpdateParams::event]
197
+ end
198
+
179
199
  type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
180
200
 
181
201
  module LimitDuration
@@ -12,7 +12,7 @@ module GrowsurfRuby
12
12
  status: GrowsurfRuby::Models::CampaignAPI::status,
13
13
  type: GrowsurfRuby::Models::CampaignAPI::type_,
14
14
  winner_count: Integer,
15
- currency_iso: String
15
+ currency_iso: String?
16
16
  }
17
17
 
18
18
  class CampaignAPI < GrowsurfRuby::Internal::Type::BaseModel
@@ -38,7 +38,7 @@ module GrowsurfRuby
38
38
 
39
39
  attr_reader currency_iso: String?
40
40
 
41
- def currency_iso=: (String) -> String
41
+ def currency_iso=: (String?) -> String?
42
42
 
43
43
  def initialize: (
44
44
  id: String,
@@ -51,7 +51,7 @@ module GrowsurfRuby
51
51
  status: GrowsurfRuby::Models::CampaignAPI::status,
52
52
  type: GrowsurfRuby::Models::CampaignAPI::type_,
53
53
  winner_count: Integer,
54
- ?currency_iso: String
54
+ ?currency_iso: String?
55
55
  ) -> void
56
56
 
57
57
  def to_hash: -> {
@@ -65,7 +65,7 @@ module GrowsurfRuby
65
65
  status: GrowsurfRuby::Models::CampaignAPI::status,
66
66
  type: GrowsurfRuby::Models::CampaignAPI::type_,
67
67
  winner_count: Integer,
68
- currency_iso: String
68
+ currency_iso: String?
69
69
  }
70
70
 
71
71
  type reward =
@@ -78,6 +78,7 @@ module GrowsurfRuby
78
78
  conversions_required: Integer?,
79
79
  coupon_code: String?,
80
80
  description: String?,
81
+ event: GrowsurfRuby::Models::CampaignAPI::Reward::event?,
81
82
  image_url: String?,
82
83
  limit: Integer?,
83
84
  limit_duration: GrowsurfRuby::Models::CampaignAPI::Reward::limit_duration?,
@@ -109,6 +110,8 @@ module GrowsurfRuby
109
110
 
110
111
  attr_accessor description: String?
111
112
 
113
+ attr_accessor event: GrowsurfRuby::Models::CampaignAPI::Reward::event?
114
+
112
115
  attr_accessor image_url: String?
113
116
 
114
117
  attr_accessor limit: Integer?
@@ -144,6 +147,7 @@ module GrowsurfRuby
144
147
  ?conversions_required: Integer?,
145
148
  ?coupon_code: String?,
146
149
  ?description: String?,
150
+ ?event: GrowsurfRuby::Models::CampaignAPI::Reward::event?,
147
151
  ?image_url: String?,
148
152
  ?limit: Integer?,
149
153
  ?limit_duration: GrowsurfRuby::Models::CampaignAPI::Reward::limit_duration?,
@@ -167,6 +171,7 @@ module GrowsurfRuby
167
171
  conversions_required: Integer?,
168
172
  coupon_code: String?,
169
173
  description: String?,
174
+ event: GrowsurfRuby::Models::CampaignAPI::Reward::event?,
170
175
  image_url: String?,
171
176
  limit: Integer?,
172
177
  limit_duration: GrowsurfRuby::Models::CampaignAPI::Reward::limit_duration?,
@@ -196,6 +201,17 @@ module GrowsurfRuby
196
201
  def self?.values: -> ::Array[GrowsurfRuby::Models::CampaignAPI::Reward::type_]
197
202
  end
198
203
 
204
+ type event = :LEAD | :CONVERSION
205
+
206
+ module Event
207
+ extend GrowsurfRuby::Internal::Type::Enum
208
+
209
+ LEAD: :LEAD
210
+ CONVERSION: :CONVERSION
211
+
212
+ def self?.values: -> ::Array[GrowsurfRuby::Models::CampaignAPI::Reward::event]
213
+ end
214
+
199
215
  type limit_duration = :IN_TOTAL | :PER_MONTH
200
216
 
201
217
  module LimitDuration
@@ -208,14 +224,16 @@ module GrowsurfRuby
208
224
  end
209
225
  end
210
226
 
211
- type status = :DRAFT | :IN_PROGRESS | :COMPLETE | :DELETED
227
+ type status = :DRAFT | :PENDING | :IN_PROGRESS | :COMPLETE | :CANCELLED | :DELETED
212
228
 
213
229
  module Status
214
230
  extend GrowsurfRuby::Internal::Type::Enum
215
231
 
216
232
  DRAFT: :DRAFT
233
+ PENDING: :PENDING
217
234
  IN_PROGRESS: :IN_PROGRESS
218
235
  COMPLETE: :COMPLETE
236
+ CANCELLED: :CANCELLED
219
237
  DELETED: :DELETED
220
238
 
221
239
  def self?.values: -> ::Array[GrowsurfRuby::Models::CampaignAPI::status]