growsurf-ruby 0.6.1 → 0.7.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 (24) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rb +28 -0
  5. data/lib/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rb +24 -0
  6. data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +130 -0
  7. data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_response.rb +81 -0
  8. data/lib/growsurf_ruby/models/campaign/participant_trigger_referral_params.rb +19 -1
  9. data/lib/growsurf_ruby/resources/campaign/participant.rb +98 -3
  10. data/lib/growsurf_ruby/version.rb +1 -1
  11. data/lib/growsurf_ruby.rb +4 -0
  12. data/rbi/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rbi +48 -0
  13. data/rbi/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rbi +36 -0
  14. data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +234 -0
  15. data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_response.rbi +131 -0
  16. data/rbi/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbi +24 -1
  17. data/rbi/growsurf_ruby/resources/campaign/participant.rbi +94 -0
  18. data/sig/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rbs +30 -0
  19. data/sig/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rbs +20 -0
  20. data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +151 -0
  21. data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_response.rbs +75 -0
  22. data/sig/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbs +7 -1
  23. data/sig/growsurf_ruby/resources/campaign/participant.rbs +28 -0
  24. metadata +14 -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: be12c4785ae7a40c39c8e74aeeddcc53359c12bdad594d2578b7da9e1bc1b20d
4
+ data.tar.gz: cb49bb681ce1bd2291b3468df5b2186f23ea41d0262210a963652934689aa956
5
5
  SHA512:
6
- metadata.gz: 6156285b4fcc4ea5e21e3ebbb24b8fa566ba91f3dfac3de601816c2fc22140caaca8190b5dfa8594ae686066953a76b46152dacd9f4befc336b0ec8a6649ef2e
7
- data.tar.gz: 2a819a4fb207ec68a72b1d17accefba64e53627ec777bda3029322aab0abbb96063340bd5a57fa647a96dbc37e0f5542e311ff05e22608c63591fe604fe333a2
6
+ metadata.gz: d3b33af554e8fac71c6c3e4df21a5565c188fee651fe4d316f6c0486c0349c460bb737e2a96c852bd8856aa01e469bbf3c65c5314617b5a800423f9558e3fa70
7
+ data.tar.gz: db54fe7cfff4279d0af2d57589aa66106a2e0b83ce59c5a37fe6809145cca0edc59a0b3dab2a0a51c93592a1016b55564469ff05a6934ec0973ad206c5f35ffe
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0 (2026-06-29)
4
+
5
+ Full Changelog: [v0.6.1...v0.7.0](https://github.com/growsurf/growsurf-ruby/compare/v0.6.1...v0.7.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** support delayed referral rewards and affiliate refunds ([d707d44](https://github.com/growsurf/growsurf-ruby/commit/d707d443a5806f3e117532d4032386390e2654a5))
10
+
3
11
  ## 0.6.1 (2026-06-26)
4
12
 
5
13
  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.7.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-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
@@ -377,6 +377,66 @@ module GrowsurfRuby
377
377
  )
378
378
  end
379
379
 
380
+ # Records an amendment (refund, partial refund, refund cancellation, or
381
+ # chargeback) against a previously recorded transaction and reverses or adjusts
382
+ # the referrer's commission.
383
+ #
384
+ # @overload refund_transaction(participant_id_or_email, id:, 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: {})
385
+ #
386
+ # @param participant_id_or_email [String] Path param: GrowSurf participant ID or URL-encoded participant email address.
387
+ #
388
+ # @param id [String] Path param: GrowSurf program ID.
389
+ #
390
+ # @param amendment_type [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::AmendmentType] Body param
391
+ #
392
+ # @param amount [Integer] Body param
393
+ #
394
+ # @param amount_refunded [Integer] Body param
395
+ #
396
+ # @param charge_id [String] Body param
397
+ #
398
+ # @param currency [String] Body param
399
+ #
400
+ # @param description [String] Body param
401
+ #
402
+ # @param external_id [String] Body param
403
+ #
404
+ # @param invoice_id [String] Body param
405
+ #
406
+ # @param order_id [String] Body param
407
+ #
408
+ # @param payment_id [String] Body param
409
+ #
410
+ # @param payment_intent_id [String] Body param
411
+ #
412
+ # @param refund_amount [Integer] Body param
413
+ #
414
+ # @param refund_id [String] Body param
415
+ #
416
+ # @param refund_status [String] Body param
417
+ #
418
+ # @param transaction_id [String] Body param
419
+ #
420
+ # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
421
+ #
422
+ # @return [GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse]
423
+ #
424
+ # @see GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams
425
+ def refund_transaction(participant_id_or_email, params)
426
+ parsed, options = GrowsurfRuby::Campaign::ParticipantRefundTransactionParams.dump_request(params)
427
+ id =
428
+ parsed.delete(:id) do
429
+ raise ArgumentError.new("missing required path argument #{_1}")
430
+ end
431
+ @client.request(
432
+ method: :post,
433
+ path: ["campaign/%1$s/participant/%2$s/transaction/refund", id, participant_id_or_email],
434
+ body: parsed,
435
+ model: GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse,
436
+ options: options
437
+ )
438
+ end
439
+
380
440
  # Sends email invites on behalf of a participant to a list of email addresses.
381
441
  #
382
442
  # @overload send_invites(participant_id_or_email, id:, email_addresses:, message_text:, subject_text:, request_options: {})
@@ -411,14 +471,20 @@ module GrowsurfRuby
411
471
  )
412
472
  end
413
473
 
474
+ # Some parameter documentations has been truncated, see
475
+ # {GrowsurfRuby::Models::Campaign::ParticipantTriggerReferralParams} for more
476
+ # details.
477
+ #
414
478
  # Triggers referral credit for an existing referred participant by GrowSurf
415
479
  # participant ID or email address.
416
480
  #
417
- # @overload trigger_referral(participant_id_or_email, id:, request_options: {})
481
+ # @overload trigger_referral(participant_id_or_email, id:, delay_in_days: nil, request_options: {})
418
482
  #
419
- # @param participant_id_or_email [String] GrowSurf participant ID or URL-encoded participant email address.
483
+ # @param participant_id_or_email [String] Path param: GrowSurf participant ID or URL-encoded participant email address.
420
484
  #
421
- # @param id [String] GrowSurf program ID.
485
+ # @param id [String] Path param: GrowSurf program ID.
486
+ #
487
+ # @param delay_in_days [Integer] Body param: Number of whole days to hold referral credit before it is awarded. U
422
488
  #
423
489
  # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
424
490
  #
@@ -434,11 +500,40 @@ module GrowsurfRuby
434
500
  @client.request(
435
501
  method: :post,
436
502
  path: ["campaign/%1$s/participant/%2$s/ref", id, participant_id_or_email],
503
+ body: parsed,
437
504
  model: GrowsurfRuby::Models::Campaign::ParticipantTriggerReferralResponse,
438
505
  options: options
439
506
  )
440
507
  end
441
508
 
509
+ # Cancels a pending delayed referral trigger for an existing referred participant
510
+ # by GrowSurf participant ID or email address.
511
+ #
512
+ # @overload cancel_delayed_referral(participant_id_or_email, id:, request_options: {})
513
+ #
514
+ # @param participant_id_or_email [String] GrowSurf participant ID or URL-encoded participant email address.
515
+ #
516
+ # @param id [String] GrowSurf program ID.
517
+ #
518
+ # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
519
+ #
520
+ # @return [GrowsurfRuby::Models::Campaign::ParticipantCancelDelayedReferralResponse]
521
+ #
522
+ # @see GrowsurfRuby::Models::Campaign::ParticipantCancelDelayedReferralParams
523
+ def cancel_delayed_referral(participant_id_or_email, params)
524
+ parsed, options = GrowsurfRuby::Campaign::ParticipantCancelDelayedReferralParams.dump_request(params)
525
+ id =
526
+ parsed.delete(:id) do
527
+ raise ArgumentError.new("missing required path argument #{_1}")
528
+ end
529
+ @client.request(
530
+ method: :delete,
531
+ path: ["campaign/%1$s/participant/%2$s/ref", id, participant_id_or_email],
532
+ model: GrowsurfRuby::Models::Campaign::ParticipantCancelDelayedReferralResponse,
533
+ options: options
534
+ )
535
+ end
536
+
442
537
  # @api private
443
538
  #
444
539
  # @param client [GrowsurfRuby::Client]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GrowsurfRuby
4
- VERSION = "0.6.1"
4
+ VERSION = "0.7.0"
5
5
  end
data/lib/growsurf_ruby.rb CHANGED
@@ -60,6 +60,8 @@ require_relative "growsurf_ruby/models/campaign/commission_delete_params"
60
60
  require_relative "growsurf_ruby/models/campaign/commission_delete_response"
61
61
  require_relative "growsurf_ruby/models/campaign/fraud_risk_level"
62
62
  require_relative "growsurf_ruby/models/campaign/participant_add_params"
63
+ require_relative "growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params"
64
+ require_relative "growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response"
63
65
  require_relative "growsurf_ruby/models/campaign/participant_delete_params"
64
66
  require_relative "growsurf_ruby/models/campaign/participant_delete_response"
65
67
  require_relative "growsurf_ruby/models/campaign/participant_list_commissions_params"
@@ -69,6 +71,8 @@ require_relative "growsurf_ruby/models/campaign/participant_list_rewards_params"
69
71
  require_relative "growsurf_ruby/models/campaign/participant_list_rewards_response"
70
72
  require_relative "growsurf_ruby/models/campaign/participant_record_transaction_params"
71
73
  require_relative "growsurf_ruby/models/campaign/participant_record_transaction_response"
74
+ require_relative "growsurf_ruby/models/campaign/participant_refund_transaction_params"
75
+ require_relative "growsurf_ruby/models/campaign/participant_refund_transaction_response"
72
76
  require_relative "growsurf_ruby/models/campaign/participant_retrieve_params"
73
77
  require_relative "growsurf_ruby/models/campaign/participant_reward"
74
78
  require_relative "growsurf_ruby/models/campaign/participant_send_invites_params"
@@ -0,0 +1,48 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ class ParticipantCancelDelayedReferralParams < GrowsurfRuby::Internal::Type::BaseModel
7
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
8
+ include GrowsurfRuby::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ GrowsurfRuby::Campaign::ParticipantCancelDelayedReferralParams,
14
+ GrowsurfRuby::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :participant_id_or_email
23
+
24
+ sig do
25
+ params(
26
+ id: String,
27
+ participant_id_or_email: String,
28
+ request_options: GrowsurfRuby::RequestOptions::OrHash
29
+ ).returns(T.attached_class)
30
+ end
31
+ def self.new(id:, participant_id_or_email:, request_options: {})
32
+ end
33
+
34
+ sig do
35
+ override.returns(
36
+ {
37
+ id: String,
38
+ participant_id_or_email: String,
39
+ request_options: GrowsurfRuby::RequestOptions
40
+ }
41
+ )
42
+ end
43
+ def to_hash
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,36 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ class ParticipantCancelDelayedReferralResponse < GrowsurfRuby::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ GrowsurfRuby::Models::Campaign::ParticipantCancelDelayedReferralResponse,
11
+ GrowsurfRuby::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ sig { returns(T::Boolean) }
16
+ attr_accessor :success
17
+
18
+ sig { returns(T.nilable(String)) }
19
+ attr_reader :message
20
+
21
+ sig { params(message: String).void }
22
+ attr_writer :message
23
+
24
+ sig do
25
+ params(success: T::Boolean, message: String).returns(T.attached_class)
26
+ end
27
+ def self.new(success:, message: nil)
28
+ end
29
+
30
+ sig { override.returns({ success: T::Boolean, message: String }) }
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end