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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -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/participant_cancel_delayed_referral_params.rb +28 -0
  7. data/lib/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rb +24 -0
  8. data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +130 -0
  9. data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_response.rb +81 -0
  10. data/lib/growsurf_ruby/models/campaign/participant_trigger_referral_params.rb +19 -1
  11. data/lib/growsurf_ruby/models/campaign/reward.rb +166 -0
  12. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +189 -0
  13. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +182 -0
  14. data/lib/growsurf_ruby/models/campaign_create_params.rb +82 -0
  15. data/lib/growsurf_ruby/models/campaign_update_params.rb +112 -0
  16. data/lib/growsurf_ruby/models.rb +4 -0
  17. data/lib/growsurf_ruby/resources/campaign/participant.rb +98 -3
  18. data/lib/growsurf_ruby/resources/campaign/rewards.rb +191 -0
  19. data/lib/growsurf_ruby/resources/campaign.rb +105 -0
  20. data/lib/growsurf_ruby/version.rb +1 -1
  21. data/lib/growsurf_ruby.rb +12 -0
  22. data/rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi +41 -0
  23. data/rbi/growsurf_ruby/models/campaign/delete_reward_response.rbi +38 -0
  24. data/rbi/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rbi +48 -0
  25. data/rbi/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rbi +36 -0
  26. data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +234 -0
  27. data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_response.rbi +131 -0
  28. data/rbi/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbi +24 -1
  29. data/rbi/growsurf_ruby/models/campaign/reward.rbi +252 -0
  30. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +330 -0
  31. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +281 -0
  32. data/rbi/growsurf_ruby/models/campaign_create_params.rbi +143 -0
  33. data/rbi/growsurf_ruby/models/campaign_update_params.rbi +193 -0
  34. data/rbi/growsurf_ruby/models.rbi +4 -0
  35. data/rbi/growsurf_ruby/resources/campaign/participant.rbi +94 -0
  36. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +200 -0
  37. data/rbi/growsurf_ruby/resources/campaign.rbi +99 -0
  38. data/sig/growsurf_ruby/models/campaign/campaign_reward_list_response.rbs +18 -0
  39. data/sig/growsurf_ruby/models/campaign/delete_reward_response.rbs +17 -0
  40. data/sig/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rbs +30 -0
  41. data/sig/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rbs +20 -0
  42. data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +151 -0
  43. data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_response.rbs +75 -0
  44. data/sig/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbs +7 -1
  45. data/sig/growsurf_ruby/models/campaign/reward.rbs +131 -0
  46. data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +192 -0
  47. data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +182 -0
  48. data/sig/growsurf_ruby/models/campaign_create_params.rbs +88 -0
  49. data/sig/growsurf_ruby/models/campaign_update_params.rbs +119 -0
  50. data/sig/growsurf_ruby/models.rbs +4 -0
  51. data/sig/growsurf_ruby/resources/campaign/participant.rbs +28 -0
  52. data/sig/growsurf_ruby/resources/campaign/rewards.rbs +70 -0
  53. data/sig/growsurf_ruby/resources/campaign.rbs +35 -0
  54. metadata +38 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c971f7f825ae2b01c5ac6c90c1bb0ea6cb98e62f806d50d96ebacf0f060e64c
4
- data.tar.gz: cd5ea6ea42c870db2b39d635e75c90b50ba630010b918618d9a339353311178f
3
+ metadata.gz: 3ea326d15c05d8c75b86335b99e152c1e269196cc3603ed96b38a11281509a26
4
+ data.tar.gz: ccc73ce7424bd230f00745bc08d843c5a1bcee077468c5ee5d01ee497578f9e2
5
5
  SHA512:
6
- metadata.gz: 6156285b4fcc4ea5e21e3ebbb24b8fa566ba91f3dfac3de601816c2fc22140caaca8190b5dfa8594ae686066953a76b46152dacd9f4befc336b0ec8a6649ef2e
7
- data.tar.gz: 2a819a4fb207ec68a72b1d17accefba64e53627ec777bda3029322aab0abbb96063340bd5a57fa647a96dbc37e0f5542e311ff05e22608c63591fe604fe333a2
6
+ metadata.gz: 67581d38788ab7a27e22a1f5d010e6a85e152ded9d3f5ffd512c22dd2ac52df70452254fdb02a91b237ef416f27a5326df0240b4111ce2b67bd1f8606b64d00b
7
+ data.tar.gz: 05b6ad5c2614c5ba9647bd7b54874d2feeb720659f2ae7930252afc48781d100fe0edac724b2b5f7ef789f0a75851621c0b73de2c4226a3b7602515227627c5e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
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
+
10
+ ## 0.7.0 (2026-06-29)
11
+
12
+ Full Changelog: [v0.6.1...v0.7.0](https://github.com/growsurf/growsurf-ruby/compare/v0.6.1...v0.7.0)
13
+
14
+ ### Features
15
+
16
+ * **api:** support delayed referral rewards and affiliate refunds ([d707d44](https://github.com/growsurf/growsurf-ruby/commit/d707d443a5806f3e117532d4032386390e2654a5))
17
+
3
18
  ## 0.6.1 (2026-06-26)
4
19
 
5
20
  Full Changelog: [v0.6.0...v0.6.1](https://github.com/growsurf/growsurf-ruby/compare/v0.6.0...v0.6.1)
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.6.1"
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,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Participant#cancel_delayed_referral
7
+ class ParticipantCancelDelayedReferralParams < 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 participant_id_or_email
17
+ #
18
+ # @return [String]
19
+ required :participant_id_or_email, String
20
+
21
+ # @!method initialize(id:, participant_id_or_email:, request_options: {})
22
+ # @param id [String]
23
+ # @param participant_id_or_email [String]
24
+ # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Participant#cancel_delayed_referral
7
+ class ParticipantCancelDelayedReferralResponse < GrowsurfRuby::Internal::Type::BaseModel
8
+ # @!attribute success
9
+ #
10
+ # @return [Boolean]
11
+ required :success, GrowsurfRuby::Internal::Type::Boolean
12
+
13
+ # @!attribute message
14
+ #
15
+ # @return [String, nil]
16
+ optional :message, String
17
+
18
+ # @!method initialize(success:, message: nil)
19
+ # @param success [Boolean]
20
+ # @param message [String]
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,130 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Participant#refund_transaction
7
+ class ParticipantRefundTransactionParams < 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 participant_id_or_email
17
+ #
18
+ # @return [String]
19
+ required :participant_id_or_email, String
20
+
21
+ # @!attribute amendment_type
22
+ #
23
+ # @return [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::AmendmentType, nil]
24
+ optional :amendment_type,
25
+ enum: -> { GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::AmendmentType },
26
+ api_name: :amendmentType
27
+
28
+ # @!attribute amount
29
+ #
30
+ # @return [Integer, nil]
31
+ optional :amount, Integer
32
+
33
+ # @!attribute amount_refunded
34
+ #
35
+ # @return [Integer, nil]
36
+ optional :amount_refunded, Integer, api_name: :amountRefunded
37
+
38
+ # @!attribute charge_id
39
+ #
40
+ # @return [String, nil]
41
+ optional :charge_id, String, api_name: :chargeId
42
+
43
+ # @!attribute currency
44
+ #
45
+ # @return [String, nil]
46
+ optional :currency, String
47
+
48
+ # @!attribute description
49
+ #
50
+ # @return [String, nil]
51
+ optional :description, String
52
+
53
+ # @!attribute external_id
54
+ #
55
+ # @return [String, nil]
56
+ optional :external_id, String, api_name: :externalId
57
+
58
+ # @!attribute invoice_id
59
+ #
60
+ # @return [String, nil]
61
+ optional :invoice_id, String, api_name: :invoiceId
62
+
63
+ # @!attribute order_id
64
+ #
65
+ # @return [String, nil]
66
+ optional :order_id, String, api_name: :orderId
67
+
68
+ # @!attribute payment_id
69
+ #
70
+ # @return [String, nil]
71
+ optional :payment_id, String, api_name: :paymentId
72
+
73
+ # @!attribute payment_intent_id
74
+ #
75
+ # @return [String, nil]
76
+ optional :payment_intent_id, String, api_name: :paymentIntentId
77
+
78
+ # @!attribute refund_amount
79
+ #
80
+ # @return [Integer, nil]
81
+ optional :refund_amount, Integer, api_name: :refundAmount
82
+
83
+ # @!attribute refund_id
84
+ #
85
+ # @return [String, nil]
86
+ optional :refund_id, String, api_name: :refundId
87
+
88
+ # @!attribute refund_status
89
+ #
90
+ # @return [String, nil]
91
+ optional :refund_status, String, api_name: :refundStatus
92
+
93
+ # @!attribute transaction_id
94
+ #
95
+ # @return [String, nil]
96
+ optional :transaction_id, String, api_name: :transactionId
97
+
98
+ # @!method initialize(id:, participant_id_or_email:, amendment_type: nil, amount: nil, amount_refunded: nil, charge_id: nil, currency: nil, description: nil, external_id: nil, invoice_id: nil, order_id: nil, payment_id: nil, payment_intent_id: nil, refund_amount: nil, refund_id: nil, refund_status: nil, transaction_id: nil, request_options: {})
99
+ # @param id [String]
100
+ # @param participant_id_or_email [String]
101
+ # @param amendment_type [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::AmendmentType]
102
+ # @param amount [Integer]
103
+ # @param amount_refunded [Integer]
104
+ # @param charge_id [String]
105
+ # @param currency [String]
106
+ # @param description [String]
107
+ # @param external_id [String]
108
+ # @param invoice_id [String]
109
+ # @param order_id [String]
110
+ # @param payment_id [String]
111
+ # @param payment_intent_id [String]
112
+ # @param refund_amount [Integer]
113
+ # @param refund_id [String]
114
+ # @param refund_status [String]
115
+ # @param transaction_id [String]
116
+ # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
117
+
118
+ module AmendmentType
119
+ extend GrowsurfRuby::Internal::Type::Enum
120
+
121
+ REFUND = :REFUND
122
+ CHARGEBACK = :CHARGEBACK
123
+
124
+ # @!method self.values
125
+ # @return [Array<Symbol>]
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Participant#refund_transaction
7
+ class ParticipantRefundTransactionResponse < GrowsurfRuby::Internal::Type::BaseModel
8
+ # @!attribute adjusted
9
+ #
10
+ # @return [Integer]
11
+ required :adjusted, Integer
12
+
13
+ # @!attribute amendment_type
14
+ #
15
+ # @return [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::AmendmentType]
16
+ required :amendment_type,
17
+ enum: -> { GrowsurfRuby::Campaign::ParticipantRefundTransactionResponse::AmendmentType },
18
+ api_name: :amendmentType
19
+
20
+ # @!attribute deleted
21
+ #
22
+ # @return [Integer]
23
+ required :deleted, Integer
24
+
25
+ # @!attribute matched
26
+ #
27
+ # @return [Integer]
28
+ required :matched, Integer
29
+
30
+ # @!attribute matching_commission_ids
31
+ #
32
+ # @return [Array<String>]
33
+ required :matching_commission_ids,
34
+ GrowsurfRuby::Internal::Type::ArrayOf[String],
35
+ api_name: :matchingCommissionIds
36
+
37
+ # @!attribute message
38
+ #
39
+ # @return [String]
40
+ required :message, String
41
+
42
+ # @!attribute reversed
43
+ #
44
+ # @return [Integer]
45
+ required :reversed, Integer
46
+
47
+ # @!attribute success
48
+ #
49
+ # @return [Boolean]
50
+ required :success, GrowsurfRuby::Internal::Type::Boolean
51
+
52
+ # @!attribute not_found
53
+ #
54
+ # @return [Boolean, nil]
55
+ optional :not_found, GrowsurfRuby::Internal::Type::Boolean, api_name: :notFound
56
+
57
+ # @!method initialize(adjusted:, amendment_type:, deleted:, matched:, matching_commission_ids:, message:, reversed:, success:, not_found: nil)
58
+ # @param adjusted [Integer]
59
+ # @param amendment_type [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::AmendmentType]
60
+ # @param deleted [Integer]
61
+ # @param matched [Integer]
62
+ # @param matching_commission_ids [Array<String>]
63
+ # @param message [String]
64
+ # @param reversed [Integer]
65
+ # @param success [Boolean]
66
+ # @param not_found [Boolean]
67
+
68
+ # @see GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse#amendment_type
69
+ module AmendmentType
70
+ extend GrowsurfRuby::Internal::Type::Enum
71
+
72
+ REFUND = :REFUND
73
+ CHARGEBACK = :CHARGEBACK
74
+
75
+ # @!method self.values
76
+ # @return [Array<Symbol>]
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
@@ -18,9 +18,27 @@ module GrowsurfRuby
18
18
  # @return [String]
19
19
  required :participant_id_or_email, String
20
20
 
21
- # @!method initialize(id:, participant_id_or_email:, request_options: {})
21
+ # @!attribute delay_in_days
22
+ # Number of whole days to hold referral credit before it is awarded. Useful for
23
+ # honoring a refund window before crediting a referrer. Omit this field to award
24
+ # credit immediately. The credit is awarded automatically once the delay elapses,
25
+ # and can be cancelled before then with the Cancel delayed referral trigger
26
+ # request.
27
+ #
28
+ # @return [Integer, nil]
29
+ optional :delay_in_days, Integer, api_name: :delayInDays
30
+
31
+ # @!method initialize(id:, participant_id_or_email:, delay_in_days: nil, request_options: {})
32
+ # Some parameter documentations has been truncated, see
33
+ # {GrowsurfRuby::Models::Campaign::ParticipantTriggerReferralParams} for more
34
+ # details.
35
+ #
22
36
  # @param id [String]
37
+ #
23
38
  # @param participant_id_or_email [String]
39
+ #
40
+ # @param delay_in_days [Integer] Number of whole days to hold referral credit before it is awarded. Useful for
41
+ #
24
42
  # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
25
43
  end
26
44
  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