growsurf-ruby 1.1.2 → 1.2.1

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/growsurf_ruby/client.rb +5 -5
  5. data/lib/growsurf_ruby/models/account_create_response.rb +5 -12
  6. data/lib/growsurf_ruby/models/team.rb +48 -0
  7. data/lib/growsurf_ruby/models/team_resend_owner_verification_email_response.rb +34 -0
  8. data/lib/growsurf_ruby/models/{account_rotate_api_key_response.rb → team_rotate_api_key_response.rb} +3 -3
  9. data/lib/growsurf_ruby/models/team_update_params.rb +22 -0
  10. data/lib/growsurf_ruby/models.rb +3 -3
  11. data/lib/growsurf_ruby/resources/account.rb +18 -124
  12. data/lib/growsurf_ruby/resources/campaign/commission.rb +3 -2
  13. data/lib/growsurf_ruby/resources/campaign/design.rb +7 -11
  14. data/lib/growsurf_ruby/resources/campaign/emails.rb +9 -11
  15. data/lib/growsurf_ruby/resources/campaign/installation.rb +8 -12
  16. data/lib/growsurf_ruby/resources/campaign/options.rb +11 -13
  17. data/lib/growsurf_ruby/resources/campaign/participant.rb +45 -36
  18. data/lib/growsurf_ruby/resources/campaign/reward.rb +4 -3
  19. data/lib/growsurf_ruby/resources/campaign/rewards.rb +18 -6
  20. data/lib/growsurf_ruby/resources/campaign.rb +16 -13
  21. data/lib/growsurf_ruby/resources/team.rb +118 -0
  22. data/lib/growsurf_ruby/version.rb +1 -1
  23. data/lib/growsurf_ruby.rb +5 -4
  24. data/rbi/growsurf_ruby/client.rbi +4 -1
  25. data/rbi/growsurf_ruby/models/account_create_response.rbi +0 -8
  26. data/rbi/growsurf_ruby/models/team.rbi +65 -0
  27. data/rbi/growsurf_ruby/models/{account_resend_verification_email_response.rbi → team_resend_owner_verification_email_response.rbi} +8 -18
  28. data/rbi/growsurf_ruby/models/{account_rotate_api_key_response.rbi → team_rotate_api_key_response.rbi} +3 -7
  29. data/rbi/growsurf_ruby/models/team_update_params.rbi +35 -0
  30. data/rbi/growsurf_ruby/models.rbi +3 -3
  31. data/rbi/growsurf_ruby/resources/account.rbi +13 -85
  32. data/rbi/growsurf_ruby/resources/campaign/commission.rbi +3 -2
  33. data/rbi/growsurf_ruby/resources/campaign/design.rbi +7 -5
  34. data/rbi/growsurf_ruby/resources/campaign/emails.rbi +9 -6
  35. data/rbi/growsurf_ruby/resources/campaign/installation.rbi +8 -8
  36. data/rbi/growsurf_ruby/resources/campaign/options.rbi +11 -8
  37. data/rbi/growsurf_ruby/resources/campaign/participant.rbi +45 -36
  38. data/rbi/growsurf_ruby/resources/campaign/reward.rbi +4 -3
  39. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +18 -6
  40. data/rbi/growsurf_ruby/resources/campaign.rbi +16 -11
  41. data/rbi/growsurf_ruby/resources/team.rbi +75 -0
  42. data/sig/growsurf_ruby/client.rbs +3 -1
  43. data/sig/growsurf_ruby/models/account_create_response.rbs +0 -5
  44. data/sig/growsurf_ruby/models/team.rbs +36 -0
  45. data/sig/growsurf_ruby/models/team_resend_owner_verification_email_response.rbs +31 -0
  46. data/sig/growsurf_ruby/models/{account_rotate_api_key_response.rbs → team_rotate_api_key_response.rbs} +2 -2
  47. data/sig/growsurf_ruby/models/team_update_params.rbs +23 -0
  48. data/sig/growsurf_ruby/models.rbs +3 -3
  49. data/sig/growsurf_ruby/resources/account.rbs +0 -23
  50. data/sig/growsurf_ruby/resources/team.rbs +28 -0
  51. metadata +17 -14
  52. data/lib/growsurf_ruby/models/account.rb +0 -90
  53. data/lib/growsurf_ruby/models/account_resend_verification_email_response.rb +0 -33
  54. data/lib/growsurf_ruby/models/account_update_params.rb +0 -35
  55. data/rbi/growsurf_ruby/models/account.rbi +0 -125
  56. data/rbi/growsurf_ruby/models/account_update_params.rbi +0 -65
  57. data/sig/growsurf_ruby/models/account.rbs +0 -67
  58. data/sig/growsurf_ruby/models/account_resend_verification_email_response.rbs +0 -35
  59. data/sig/growsurf_ruby/models/account_update_params.rbs +0 -42
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8076462c15a156d463bf26bb5f654d2baf7a6795204be7b8ef79a9dd2ae2053
4
- data.tar.gz: da320558ee220ff66aac11869a410cdcb402084b9563985763da99c47cce1755
3
+ metadata.gz: d3f7355b6a4f09692cd4f02923eda76fe0887f88b647f0cfdc461b93e36337f6
4
+ data.tar.gz: 16ae21e1f33b5f0ffead7caf1f93d80758fbffce09c3d634d0350f5cde7e1e36
5
5
  SHA512:
6
- metadata.gz: d5c1d9647d05936815ddae19a40e12a06cf4d1ed469f27c86dc03b543b3abd9895923e494c4bb0f7a28ba50c0c219bafa78276c0feb15d94f08b43d40b59f908
7
- data.tar.gz: fe5bcdf5683be8d8dbf038f33ca365d66d5959f5c3d3a5b7e9c8e9717e0970564d8d5ac9b6d625bbf1af24edda057405aacefd9f4a35e6cd7c48f2aac1023a51
6
+ metadata.gz: c58b6e6dd858d7c7e419bd5d96d605b27d8de8518d3c9c2ff2c4dd121473404a6843f0e62dc6c4b0190c02ae7bed3821542b73ab5ebf9bf3646ee343783a92ee
7
+ data.tar.gz: d98124e2a70ebb54f25757c814342a2ee6f4d5595c3713ebb26386b9157474eaee6ad35825ad091f5b180455d89d9a334972fd37e53593c1c066d3d3d7b7f553
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.1](https://github.com/growsurf/growsurf-ruby/compare/v1.2.0...v1.2.1) (2026-07-14)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * align method docs with the REST v2 contract ([11967f2](https://github.com/growsurf/growsurf-ruby/commit/11967f2d1b95266e921775b921db970fc11e3cbb))
9
+
10
+ ## [1.2.0](https://github.com/growsurf/growsurf-ruby/compare/v1.1.2...v1.2.0) (2026-07-13)
11
+
12
+
13
+ ### Features
14
+
15
+ * **api:** add Team resource ([8b11d89](https://github.com/growsurf/growsurf-ruby/commit/8b11d89403a00bb2c381dd46295252d929d48370))
16
+
3
17
  ## [1.1.2](https://github.com/growsurf/growsurf-ruby/compare/v1.1.1...v1.1.2) (2026-07-11)
4
18
 
5
19
 
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", "~> 1.1.2"
20
+ gem "growsurf-ruby", "~> 1.2.1"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -22,6 +22,9 @@ module GrowsurfRuby
22
22
  # @return [GrowsurfRuby::Resources::Account]
23
23
  attr_reader :account
24
24
 
25
+ # @return [GrowsurfRuby::Resources::Team]
26
+ attr_reader :team
27
+
25
28
  # @return [GrowsurfRuby::Resources::Campaign]
26
29
  attr_reader :campaign
27
30
 
@@ -59,10 +62,6 @@ module GrowsurfRuby
59
62
  )
60
63
  base_url ||= "https://api.growsurf.com/v2"
61
64
 
62
- if api_key.nil?
63
- raise ArgumentError.new("api_key is required, and can be set via environ: \"GROWSURF_API_KEY\"")
64
- end
65
-
66
65
  headers = {}
67
66
  custom_headers_env = ENV["GROWSURF_CUSTOM_HEADERS"]
68
67
  unless custom_headers_env.nil?
@@ -76,7 +75,7 @@ module GrowsurfRuby
76
75
  headers = parsed.merge(headers)
77
76
  end
78
77
 
79
- @api_key = api_key.to_s
78
+ @api_key = api_key&.to_s
80
79
 
81
80
  super(
82
81
  base_url: base_url,
@@ -89,6 +88,7 @@ module GrowsurfRuby
89
88
  )
90
89
 
91
90
  @account = GrowsurfRuby::Resources::Account.new(client: self)
91
+ @team = GrowsurfRuby::Resources::Team.new(client: self)
92
92
  @campaign = GrowsurfRuby::Resources::Campaign.new(client: self)
93
93
  end
94
94
  end
@@ -14,18 +14,13 @@ module GrowsurfRuby
14
14
  required :api_key, String, api_name: :apiKey
15
15
 
16
16
  # @!attribute email
17
+ # Email address for the new account.
17
18
  #
18
19
  # @return [String]
19
20
  required :email, String
20
21
 
21
- # @!attribute id
22
- # The new account's unique identifier.
23
- #
24
- # @return [String]
25
- required :id, String
26
-
27
22
  # @!attribute verification_status
28
- # GrowSurf account verification state. `VERIFIED` is required before a program
23
+ # GrowSurf team verification state. `VERIFIED` is required before a program
29
24
  # can send participant emails.
30
25
  #
31
26
  # @return [Symbol, GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus]
@@ -33,7 +28,7 @@ module GrowsurfRuby
33
28
  enum: -> { GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus },
34
29
  api_name: :verificationStatus
35
30
 
36
- # @!method initialize(api_key:, email:, id:, verification_status:)
31
+ # @!method initialize(api_key:, email:, verification_status:)
37
32
  # Some parameter documentations has been truncated, see
38
33
  # {GrowsurfRuby::Models::AccountCreateResponse} for more details.
39
34
  #
@@ -41,11 +36,9 @@ module GrowsurfRuby
41
36
  #
42
37
  # @param email [String]
43
38
  #
44
- # @param id [String] The new account's unique identifier.
45
- #
46
- # @param verification_status [Symbol, GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus] GrowSurf account verification state. `VERIFIED` is required before a program can
39
+ # @param verification_status [Symbol, GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus] GrowSurf team verification state. `VERIFIED` is required before a program can
47
40
 
48
- # GrowSurf account verification state. `VERIFIED` is required before a program
41
+ # GrowSurf team verification state. `VERIFIED` is required before a program
49
42
  # can send participant emails.
50
43
  #
51
44
  # @see GrowsurfRuby::Models::AccountCreateResponse#verification_status
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ # @see GrowsurfRuby::Resources::Team#retrieve
6
+ class Team < GrowsurfRuby::Internal::Type::BaseModel
7
+ # @!attribute name
8
+ # The team's display name.
9
+ #
10
+ # @return [String]
11
+ required :name, String
12
+
13
+ # @!attribute verification_status
14
+ # GrowSurf team verification state. `VERIFIED` is required before a program can
15
+ # send participant emails.
16
+ #
17
+ # @return [Symbol, GrowsurfRuby::Models::Team::VerificationStatus]
18
+ required :verification_status,
19
+ enum: -> { GrowsurfRuby::Models::Team::VerificationStatus },
20
+ api_name: :verificationStatus
21
+
22
+ # @!attribute verification_requested_at
23
+ # When team verification was last requested, as a Unix timestamp in milliseconds.
24
+ #
25
+ # @return [Integer, nil]
26
+ required :verification_requested_at, Integer, api_name: :verificationRequestedAt, nil?: true
27
+
28
+ # @!method initialize(name:, verification_status:, verification_requested_at:)
29
+ # @param name [String] The team's display name.
30
+ #
31
+ # @param verification_status [Symbol, GrowsurfRuby::Models::Team::VerificationStatus] GrowSurf team verification state.
32
+ #
33
+ # @param verification_requested_at [Integer, nil] When team verification was last requested, as a Unix timestamp in milliseconds.
34
+
35
+ # GrowSurf team verification state.
36
+ module VerificationStatus
37
+ extend GrowsurfRuby::Internal::Type::Enum
38
+
39
+ NOT_REQUESTED = :NOT_REQUESTED
40
+ REQUESTED = :REQUESTED
41
+ VERIFIED = :VERIFIED
42
+
43
+ # @!method self.values
44
+ # @return [Array<Symbol>]
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ # @see GrowsurfRuby::Resources::Team#resend_owner_verification_email
6
+ class TeamResendOwnerVerificationEmailResponse < GrowsurfRuby::Internal::Type::BaseModel
7
+ # @!attribute status
8
+ # Status of the verification email request.
9
+ #
10
+ # @return [Symbol, GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::Status]
11
+ required :status, enum: -> { GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::Status }
12
+
13
+ # @!attribute success
14
+ # Whether the verification email request was accepted.
15
+ #
16
+ # @return [Boolean]
17
+ required :success, GrowsurfRuby::Internal::Type::Boolean
18
+
19
+ # @!method initialize(status:, success:)
20
+ # @param status [Symbol, GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::Status]
21
+ #
22
+ # @param success [Boolean]
23
+
24
+ module Status
25
+ extend GrowsurfRuby::Internal::Type::Enum
26
+
27
+ SENT = :SENT
28
+
29
+ # @!method self.values
30
+ # @return [Array<Symbol>]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -2,8 +2,8 @@
2
2
 
3
3
  module GrowsurfRuby
4
4
  module Models
5
- # @see GrowsurfRuby::Resources::Account#rotate_api_key
6
- class AccountRotateAPIKeyResponse < GrowsurfRuby::Internal::Type::BaseModel
5
+ # @see GrowsurfRuby::Resources::Team#rotate_api_key
6
+ class TeamRotateAPIKeyResponse < GrowsurfRuby::Internal::Type::BaseModel
7
7
  # @!attribute api_key
8
8
  # The new API key. Store it now; the key used for rotation stops working immediately.
9
9
  #
@@ -11,7 +11,7 @@ module GrowsurfRuby
11
11
  required :api_key, String, api_name: :apiKey
12
12
 
13
13
  # @!method initialize(api_key:)
14
- # @param api_key [String] The new API key. Store it now; the key used for rotation stops working immediately.
14
+ # @param api_key [String] The new API key.
15
15
  end
16
16
  end
17
17
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ # @see GrowsurfRuby::Resources::Team#update
6
+ class TeamUpdateParams < GrowsurfRuby::Internal::Type::BaseModel
7
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
8
+ include GrowsurfRuby::Internal::Type::RequestParameters
9
+
10
+ # @!attribute name
11
+ # The team's display name.
12
+ #
13
+ # @return [String]
14
+ required :name, String
15
+
16
+ # @!method initialize(name:, request_options: {})
17
+ # @param name [String] The team's display name.
18
+ #
19
+ # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
20
+ end
21
+ end
22
+ end
@@ -39,11 +39,11 @@ module GrowsurfRuby
39
39
  mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
40
40
  end
41
41
 
42
- Account = GrowsurfRuby::Models::Account
43
-
44
42
  AccountCreateParams = GrowsurfRuby::Models::AccountCreateParams
45
43
 
46
- AccountUpdateParams = GrowsurfRuby::Models::AccountUpdateParams
44
+ Team = GrowsurfRuby::Models::Team
45
+
46
+ TeamUpdateParams = GrowsurfRuby::Models::TeamUpdateParams
47
47
 
48
48
  Campaign = GrowsurfRuby::Models::Campaign
49
49
 
@@ -4,30 +4,29 @@ module GrowsurfRuby
4
4
  module Resources
5
5
  class Account
6
6
  # Creates a new GrowSurf account. This is the only endpoint that does not require
7
- # an API key. The response includes an API key for the new account, shown once
8
- # in the response. The key is locked until the account's email address is
9
- # verified: authenticated endpoints outside the `Accounts` group return a `403`
10
- # with error code
11
- # `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
12
- # /account/verification-email`, then retry). A welcome email is sent to the
13
- # address with the verification link and a set-password link for dashboard
14
- # access. Accounts whose email is never verified are deleted automatically after
15
- # 7 days. For security, the API key is rotated the first time the account owner
16
- # signs in to the GrowSurf dashboard. Some actions (such as emailing
17
- # participants) additionally require the GrowSurf team to verify the account
18
- # first. By creating an account you agree, on behalf of the account holder, to
19
- # GrowSurf's [Terms of Service](https://growsurf.com/terms) and
20
- # [Privacy Policy](https://growsurf.com/privacy).
7
+ # an API key. The response includes an API key for the new account, shown once in
8
+ # the response. The key is locked until the team owner's email address is
9
+ # verified: authenticated program and resource endpoints return a `403` with error
10
+ # code `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
11
+ # /team/owner/verification-email`, then retry). A welcome email is sent to the
12
+ # address with the verification link and a set-password link for dashboard access.
13
+ # Accounts whose email is never verified are deleted automatically after 7 days.
14
+ # For security, the API key is rotated the first time the account owner signs in
15
+ # to the GrowSurf dashboard. Some actions (such as emailing participants)
16
+ # additionally require GrowSurf to verify the team first. By creating an account
17
+ # you agree, on behalf of the account holder, to GrowSurf's [Terms of
18
+ # Service](https://growsurf.com/terms) and [Privacy
19
+ # Policy](https://growsurf.com/privacy).
21
20
  #
22
21
  # @overload create(email:, company: nil, first_name: nil, last_name: nil, request_options: {})
23
22
  #
24
- # @param email [String] The email address for the new account. Personal emails and disposable email addresses are not accepted.
23
+ # @param email [String] The email address for the new GrowSurf account. Personal emails and disposable email addresses are not accepted.
25
24
  #
26
- # @param company [String]
25
+ # @param company [String] Company name for the new account.
27
26
  #
28
- # @param first_name [String]
27
+ # @param first_name [String] First name for the new account owner.
29
28
  #
30
- # @param last_name [String]
29
+ # @param last_name [String] Last name for the new account owner.
31
30
  #
32
31
  # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
33
32
  #
@@ -36,6 +35,7 @@ module GrowsurfRuby
36
35
  # @see GrowsurfRuby::Models::AccountCreateParams
37
36
  def create(params)
38
37
  parsed, options = GrowsurfRuby::AccountCreateParams.dump_request(params)
38
+ options[:extra_headers] = options[:extra_headers].to_h.merge("authorization" => nil)
39
39
  @client.request(
40
40
  method: :post,
41
41
  path: "accounts",
@@ -45,112 +45,6 @@ module GrowsurfRuby
45
45
  )
46
46
  end
47
47
 
48
- # Retrieves the account that owns the API key: profile and GrowSurf-team
49
- # verification state.
50
- # `verificationStatus` is `VERIFIED` once the GrowSurf team has verified the account
51
- # — this is required before you can send participant emails from a program.
52
- #
53
- # @overload retrieve(request_options: {})
54
- #
55
- # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
56
- #
57
- # @return [GrowsurfRuby::Models::Account]
58
- def retrieve(params = {})
59
- @client.request(
60
- method: :get,
61
- path: "account",
62
- model: GrowsurfRuby::Account,
63
- options: params[:request_options]
64
- )
65
- end
66
-
67
- # Updates your own account profile (`firstName`, `lastName`, `company`). Any other
68
- # property is rejected with a `400` — in particular, the account `email` cannot be
69
- # changed via the API, and billing/subscription is not editable here.
70
- #
71
- # @overload update(company: nil, first_name: nil, last_name: nil, request_options: {})
72
- #
73
- # @param company [String]
74
- #
75
- # @param first_name [String]
76
- #
77
- # @param last_name [String]
78
- #
79
- # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
80
- #
81
- # @return [GrowsurfRuby::Models::Account]
82
- #
83
- # @see GrowsurfRuby::Models::AccountUpdateParams
84
- def update(params = {})
85
- parsed, options = GrowsurfRuby::AccountUpdateParams.dump_request(params)
86
- @client.request(
87
- method: :patch,
88
- path: "account",
89
- body: parsed,
90
- model: GrowsurfRuby::Account,
91
- options: options
92
- )
93
- end
94
-
95
- # Generates a new API key and invalidates the key used for the request. The SDK
96
- # sends a retry-safe `Idempotency-Key`, so automatic retries return the same
97
- # replacement. Store the returned key, then update every integration that used
98
- # the old key. The account owner is notified by email whenever the key is rotated.
99
- # Requires an API key with `api_key:rotate`. This operation is available only through
100
- # the REST API or a GrowSurf API SDK, not through MCP.
101
- #
102
- # @overload rotate_api_key(request_options: {})
103
- #
104
- # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
105
- #
106
- # @return [GrowsurfRuby::Models::AccountRotateAPIKeyResponse]
107
- def rotate_api_key(params = {})
108
- @client.request(
109
- method: :post,
110
- path: "account/api-key",
111
- model: GrowsurfRuby::Models::AccountRotateAPIKeyResponse,
112
- options: params[:request_options]
113
- )
114
- end
115
-
116
- # Requests GrowSurf-team verification of your account (required before a program can
117
- # email its participants). Idempotent — calling it again while a request is pending
118
- # does not create a duplicate. Returns the account with its updated
119
- # `verificationStatus`.
120
- #
121
- # @overload request_verification(request_options: {})
122
- #
123
- # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
124
- #
125
- # @return [GrowsurfRuby::Models::Account]
126
- def request_verification(params = {})
127
- @client.request(
128
- method: :post,
129
- path: "account/verification-request",
130
- model: GrowsurfRuby::Account,
131
- options: params[:request_options]
132
- )
133
- end
134
-
135
- # Resends the email-verification email to the account's email address. A `200`
136
- # with `status: SENT` is only returned when an email was actually dispatched.
137
- # Returns a `400` if the email is already verified, or a `429` if a verification
138
- # email was sent too recently — wait a moment, then retry.
139
- #
140
- # @overload resend_verification_email(request_options: {})
141
- #
142
- # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
143
- #
144
- # @return [GrowsurfRuby::Models::AccountResendVerificationEmailResponse]
145
- def resend_verification_email(params = {})
146
- @client.request(
147
- method: :post,
148
- path: "account/verification-email",
149
- model: GrowsurfRuby::Models::AccountResendVerificationEmailResponse,
150
- options: params[:request_options]
151
- )
152
- end
153
-
154
48
  # @api private
155
49
  #
156
50
  # @param client [GrowsurfRuby::Client]
@@ -5,7 +5,7 @@ module GrowsurfRuby
5
5
  class Campaign
6
6
  # Affiliate transaction, commission, and payout operations.
7
7
  class Commission
8
- # Removes a pending participant commission.
8
+ # **Affiliate programs only.** Removes a pending participant commission.
9
9
  #
10
10
  # @overload delete(commission_id, id:, request_options: {})
11
11
  #
@@ -32,7 +32,8 @@ module GrowsurfRuby
32
32
  )
33
33
  end
34
34
 
35
- # Approves a pending participant commission so it can become eligible for payout.
35
+ # **Affiliate programs only.** Approves a pending participant commission so it can
36
+ # become eligible for payout.
36
37
  #
37
38
  # @overload approve(commission_id, id:, request_options: {})
38
39
  #
@@ -5,12 +5,11 @@ module GrowsurfRuby
5
5
  class Campaign
6
6
  class Design
7
7
  # Retrieves a program's design configuration — the same surface as the dashboard
8
- # Program Editor's **Design** tab (window layout, header, share channels, signup
9
- # form, portal/landing pages, theme styling, and summary/status sections).
10
- #
11
- # This is a large, deeply nested object whose available fields depend on the
12
- # program type; the response includes every field and its current value, which
13
- # is the same shape you send back on update.
8
+ # Program Editor's **Design** tab: the GrowSurf window layout, header, share
9
+ # channels + invite, signup form, portal/landing pages, theme styling, and the
10
+ # referral/affiliate summary + status sections. This is a large object whose
11
+ # available fields depend on the program type; the response includes every field
12
+ # and its current value, which is the same shape you send back on `PATCH`.
14
13
  #
15
14
  # @overload retrieve(id, request_options: {})
16
15
  #
@@ -31,11 +30,8 @@ module GrowsurfRuby
31
30
  # Updates a program's design configuration. Only the fields you send are changed;
32
31
  # anything you leave out is untouched (arrays such as `signup.fields` replace
33
32
  # wholesale). Unknown fields, fields not available for the program type, and
34
- # invalid values return a `400`.
35
- #
36
- # The request body is a partial {CampaignDesign} object. To see the full object
37
- # with every field and its current value, `GET` this resource, then `PATCH` back
38
- # only the fields you want to change.
33
+ # invalid values return a `400`. Landing-page custom code and JavaScript are not
34
+ # editable via the API.
39
35
  #
40
36
  # @overload update(id, body, request_options: {})
41
37
  #
@@ -5,11 +5,10 @@ module GrowsurfRuby
5
5
  class Campaign
6
6
  class Emails
7
7
  # Retrieves a program's email configuration — the same surface as the dashboard
8
- # Program Editor's **Emails** tab (per-email templates plus sender, contact, and
9
- # design settings).
10
- #
11
- # To see the full object with every field and its current value, `GET` this
12
- # resource, then `PATCH` back only the fields you want to change.
8
+ # Program Editor's **Emails** tab. Returns each editable email template
9
+ # (`subject`, `preheader`, `body`, `isEnabled`) plus the `settings` block (sender,
10
+ # contact, and design). The set of email templates returned depends on the program
11
+ # type (referral vs affiliate).
13
12
  #
14
13
  # @overload retrieve(id, request_options: {})
15
14
  #
@@ -28,12 +27,11 @@ module GrowsurfRuby
28
27
  end
29
28
 
30
29
  # Updates a program's email configuration. Only the fields you send are changed;
31
- # anything you leave out is untouched. Unknown fields and invalid values return a
32
- # `400`.
33
- #
34
- # The request body is a partial {CampaignEmails} object. To see the full object
35
- # with every field and its current value, `GET` this resource, then `PATCH` back
36
- # only the fields you want to change.
30
+ # omitted fields are left untouched. You may only write the email templates the
31
+ # dashboard exposes for the program type — writing a template that is not
32
+ # available for the program type returns a `400`. Some fields are read-only
33
+ # (`settings.sender.fromEmail`, whose custom value requires dashboard domain
34
+ # verification).
37
35
  #
38
36
  # @overload update(id, body, request_options: {})
39
37
  #
@@ -5,12 +5,9 @@ module GrowsurfRuby
5
5
  class Campaign
6
6
  class Installation
7
7
  # Retrieves a program's installation configuration — the same surface as the
8
- # dashboard Program Editor's **Installation** tab (signup and mobile SDK
9
- # installation settings).
10
- #
11
- # This is a nested object whose available fields depend on the program type. To
12
- # see the full object with every field and its current value, `GET` this
13
- # resource, then `PATCH` back only the fields you want to change.
8
+ # dashboard Program Editor's **Installation** tab (plus the Mobile SDK settings).
9
+ # Includes the referral trigger (referral programs only), signup tracking method,
10
+ # share URL and whitelist, custom-form signup settings, and mobile SDK settings.
14
11
  #
15
12
  # @overload retrieve(id, request_options: {})
16
13
  #
@@ -29,12 +26,11 @@ module GrowsurfRuby
29
26
  end
30
27
 
31
28
  # Updates a program's installation configuration. Only the fields you send are
32
- # changed; anything you leave out is untouched. Unknown fields, fields not
33
- # available for the program type, and invalid values return a `400`.
34
- #
35
- # The request body is a partial {CampaignInstallation} object. To see the full
36
- # object with every field and its current value, `GET` this resource, then
37
- # `PATCH` back only the fields you want to change.
29
+ # changed; omitted fields are left untouched. `referralTrigger` is only available
30
+ # for referral programs. `mobile.publicKey` is read-only; if no key exists yet,
31
+ # enabling `mobile.isEnabled` creates one. Changing `shareUrl` re-resolves its
32
+ # redirect destinations, which may take a moment to complete. URLs must include an
33
+ # explicit `http://` or `https://` scheme.
38
34
  #
39
35
  # @overload update(id, body, request_options: {})
40
36
  #
@@ -4,12 +4,11 @@ module GrowsurfRuby
4
4
  module Resources
5
5
  class Campaign
6
6
  class Options
7
- # Retrieves a program's options configuration — the same surface as the dashboard
8
- # Program Editor's **Options** tab (fraud/reCAPTCHA, tax documentation,
9
- # notification emails, and other program settings).
10
- #
11
- # To see the full object with every field and its current value, `GET` this
12
- # resource, then `PATCH` back only the fields you want to change.
7
+ # Retrieves a program's options — the same surface as the dashboard Program
8
+ # Editor's **Options** tab. Includes reward/fraud approval, anti-fraud lists +
9
+ # toggles, referral cookie/credit windows, reCAPTCHA, payout threshold + tax
10
+ # settings (affiliate only), and notification-email settings.
11
+ # `fraud.recaptcha.secretKey` is never returned.
13
12
  #
14
13
  # @overload retrieve(id, request_options: {})
15
14
  #
@@ -27,13 +26,12 @@ module GrowsurfRuby
27
26
  )
28
27
  end
29
28
 
30
- # Updates a program's options configuration. Only the fields you send are changed;
31
- # anything you leave out is untouched. Unknown fields and invalid values return a
32
- # `400`.
33
- #
34
- # The request body is a partial {CampaignOptions} object. To see the full object
35
- # with every field and its current value, `GET` this resource, then `PATCH` back
36
- # only the fields you want to change.
29
+ # Updates a program's options. Only the fields you send are changed. Some fields
30
+ # are program-type specific (`requireManualRewardApproval`/`autoFulfillRewards`
31
+ # are referral-only; `payoutThreshold`/`taxDocumentation` are affiliate-only, and
32
+ # affiliate programs require `requireParticipantAuth: true`).
33
+ # `fraud.recaptcha.secretKey` is write-only. `referralCreditWindowDays: null`
34
+ # means "never expires".
37
35
  #
38
36
  # @overload update(id, body, request_options: {})
39
37
  #