growsurf-ruby 1.17.0 → 1.19.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 (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/README.md +1 -1
  4. data/lib/growsurf_ruby/client.rb +0 -4
  5. data/lib/growsurf_ruby/errors.rb +128 -0
  6. data/lib/growsurf_ruby/models/campaign/campaign_custom_domain.rb +109 -0
  7. data/lib/growsurf_ruby/models/campaign/create.rb +18 -4
  8. data/lib/growsurf_ruby/models/campaign/custom_domain_set_params.rb +25 -0
  9. data/lib/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rb +27 -0
  10. data/lib/growsurf_ruby/models/campaign/participant.rb +15 -215
  11. data/lib/growsurf_ruby/models/campaign/participant_email_params.rb +12 -8
  12. data/lib/growsurf_ruby/models/campaign/participant_list_referrals_params.rb +0 -3
  13. data/lib/growsurf_ruby/models/campaign/participant_record_transaction_params.rb +16 -2
  14. data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +16 -2
  15. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +20 -0
  16. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +20 -0
  17. data/lib/growsurf_ruby/models/campaign/webhook_create_params.rb +10 -3
  18. data/lib/growsurf_ruby/models/campaign_create_params.rb +10 -5
  19. data/lib/growsurf_ruby/models/campaign_list_referrals_params.rb +0 -3
  20. data/lib/growsurf_ruby/models/campaign_update_params.rb +4 -4
  21. data/lib/growsurf_ruby/models/commission_structure.rb +3 -0
  22. data/lib/growsurf_ruby/models/referral_list.rb +17 -1
  23. data/lib/growsurf_ruby/models.rb +0 -2
  24. data/lib/growsurf_ruby/resources/campaign/custom_domain.rb +111 -0
  25. data/lib/growsurf_ruby/resources/campaign/design.rb +3 -3
  26. data/lib/growsurf_ruby/resources/campaign/emails.rb +1 -2
  27. data/lib/growsurf_ruby/resources/campaign/installation.rb +1 -2
  28. data/lib/growsurf_ruby/resources/campaign/options.rb +4 -5
  29. data/lib/growsurf_ruby/resources/campaign/participant.rb +9 -4
  30. data/lib/growsurf_ruby/resources/campaign/program_resources.rb +1 -0
  31. data/lib/growsurf_ruby/resources/campaign/rewards.rb +17 -2
  32. data/lib/growsurf_ruby/resources/campaign/webhooks.rb +13 -3
  33. data/lib/growsurf_ruby/resources/campaign.rb +15 -9
  34. data/lib/growsurf_ruby/version.rb +1 -1
  35. data/lib/growsurf_ruby.rb +4 -3
  36. data/rbi/growsurf_ruby/client.rbi +0 -3
  37. data/rbi/growsurf_ruby/errors.rbi +64 -0
  38. data/rbi/growsurf_ruby/models/campaign/campaign_custom_domain.rbi +193 -0
  39. data/rbi/growsurf_ruby/models/campaign/create.rbi +24 -4
  40. data/rbi/growsurf_ruby/models/campaign/custom_domain_set_params.rbi +47 -0
  41. data/rbi/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rbi +40 -0
  42. data/rbi/growsurf_ruby/models/campaign/participant.rbi +15 -292
  43. data/rbi/growsurf_ruby/models/campaign/participant_email_params.rbi +23 -16
  44. data/rbi/growsurf_ruby/models/campaign/participant_list_referrals_params.rbi +0 -15
  45. data/rbi/growsurf_ruby/models/campaign/participant_record_transaction_params.rbi +23 -4
  46. data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +23 -4
  47. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +24 -0
  48. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +24 -0
  49. data/rbi/growsurf_ruby/models/campaign/webhook_create_params.rbi +18 -4
  50. data/rbi/growsurf_ruby/models/campaign_create_params.rbi +6 -12
  51. data/rbi/growsurf_ruby/models/campaign_list_referrals_params.rbi +0 -15
  52. data/rbi/growsurf_ruby/models/campaign_update_params.rbi +6 -12
  53. data/rbi/growsurf_ruby/models/commission_structure.rbi +3 -0
  54. data/rbi/growsurf_ruby/models/referral_list.rbi +19 -3
  55. data/rbi/growsurf_ruby/models.rbi +0 -2
  56. data/rbi/growsurf_ruby/resources/campaign/custom_domain.rbi +91 -0
  57. data/rbi/growsurf_ruby/resources/campaign/design.rbi +3 -3
  58. data/rbi/growsurf_ruby/resources/campaign/emails.rbi +1 -2
  59. data/rbi/growsurf_ruby/resources/campaign/installation.rbi +1 -2
  60. data/rbi/growsurf_ruby/resources/campaign/options.rbi +4 -5
  61. data/rbi/growsurf_ruby/resources/campaign/participant.rbi +30 -15
  62. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +25 -2
  63. data/rbi/growsurf_ruby/resources/campaign/webhooks.rbi +21 -4
  64. data/rbi/growsurf_ruby/resources/campaign.rbi +21 -9
  65. data/sig/growsurf_ruby/client.rbs +0 -2
  66. data/sig/growsurf_ruby/errors.rbs +40 -0
  67. data/sig/growsurf_ruby/models/campaign/campaign_custom_domain.rbs +84 -0
  68. data/sig/growsurf_ruby/models/campaign/create.rbs +5 -0
  69. data/sig/growsurf_ruby/models/campaign/custom_domain_set_params.rbs +25 -0
  70. data/sig/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rbs +18 -0
  71. data/sig/growsurf_ruby/models/campaign/participant.rbs +7 -205
  72. data/sig/growsurf_ruby/models/campaign/participant_list_referrals_params.rbs +0 -6
  73. data/sig/growsurf_ruby/models/campaign/participant_record_transaction_params.rbs +19 -5
  74. data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +19 -5
  75. data/sig/growsurf_ruby/models/campaign_create_params.rbs +8 -12
  76. data/sig/growsurf_ruby/models/campaign_list_referrals_params.rbs +0 -6
  77. data/sig/growsurf_ruby/models/campaign_update_params.rbs +8 -12
  78. data/sig/growsurf_ruby/models/referral_list.rbs +13 -3
  79. data/sig/growsurf_ruby/models.rbs +0 -2
  80. data/sig/growsurf_ruby/resources/campaign/custom_domain.rbs +30 -0
  81. data/sig/growsurf_ruby/resources/campaign/participant.rbs +3 -2
  82. data/sig/growsurf_ruby/resources/campaign.rbs +7 -4
  83. metadata +14 -11
  84. data/lib/growsurf_ruby/models/account_create_params.rb +0 -46
  85. data/lib/growsurf_ruby/models/account_create_response.rb +0 -57
  86. data/lib/growsurf_ruby/resources/account.rb +0 -66
  87. data/rbi/growsurf_ruby/models/account_create_params.rbi +0 -73
  88. data/rbi/growsurf_ruby/models/account_create_response.rbi +0 -107
  89. data/rbi/growsurf_ruby/resources/account.rbi +0 -46
  90. data/sig/growsurf_ruby/models/account_create_params.rbs +0 -42
  91. data/sig/growsurf_ruby/models/account_create_response.rbs +0 -42
  92. data/sig/growsurf_ruby/resources/account.rbs +0 -15
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: growsurf-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Growsurf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-20 00:00:00.000000000 Z
11
+ date: 2026-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -71,8 +71,6 @@ files:
71
71
  - lib/growsurf_ruby/internal/type/unknown.rb
72
72
  - lib/growsurf_ruby/internal/util.rb
73
73
  - lib/growsurf_ruby/models.rb
74
- - lib/growsurf_ruby/models/account_create_params.rb
75
- - lib/growsurf_ruby/models/account_create_response.rb
76
74
  - lib/growsurf_ruby/models/affiliate_application.rb
77
75
  - lib/growsurf_ruby/models/affiliate_application_list_response.rb
78
76
  - lib/growsurf_ruby/models/affiliate_invite.rb
@@ -80,12 +78,15 @@ files:
80
78
  - lib/growsurf_ruby/models/analytics_availability.rb
81
79
  - lib/growsurf_ruby/models/analytics_unavailable_reason.rb
82
80
  - lib/growsurf_ruby/models/campaign.rb
81
+ - lib/growsurf_ruby/models/campaign/campaign_custom_domain.rb
83
82
  - lib/growsurf_ruby/models/campaign/campaign_reward_list_response.rb
84
83
  - lib/growsurf_ruby/models/campaign/commission_approve_params.rb
85
84
  - lib/growsurf_ruby/models/campaign/commission_approve_response.rb
86
85
  - lib/growsurf_ruby/models/campaign/commission_delete_params.rb
87
86
  - lib/growsurf_ruby/models/campaign/commission_delete_response.rb
88
87
  - lib/growsurf_ruby/models/campaign/create.rb
88
+ - lib/growsurf_ruby/models/campaign/custom_domain_set_params.rb
89
+ - lib/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rb
89
90
  - lib/growsurf_ruby/models/campaign/delete_program_resource_response.rb
90
91
  - lib/growsurf_ruby/models/campaign/delete_reward_response.rb
91
92
  - lib/growsurf_ruby/models/campaign/fraud_risk_level.rb
@@ -193,9 +194,9 @@ files:
193
194
  - lib/growsurf_ruby/models/team_rotate_api_key_response.rb
194
195
  - lib/growsurf_ruby/models/team_update_params.rb
195
196
  - lib/growsurf_ruby/request_options.rb
196
- - lib/growsurf_ruby/resources/account.rb
197
197
  - lib/growsurf_ruby/resources/campaign.rb
198
198
  - lib/growsurf_ruby/resources/campaign/commission.rb
199
+ - lib/growsurf_ruby/resources/campaign/custom_domain.rb
199
200
  - lib/growsurf_ruby/resources/campaign/design.rb
200
201
  - lib/growsurf_ruby/resources/campaign/emails.rb
201
202
  - lib/growsurf_ruby/resources/campaign/installation.rb
@@ -228,8 +229,6 @@ files:
228
229
  - rbi/growsurf_ruby/internal/type/unknown.rbi
229
230
  - rbi/growsurf_ruby/internal/util.rbi
230
231
  - rbi/growsurf_ruby/models.rbi
231
- - rbi/growsurf_ruby/models/account_create_params.rbi
232
- - rbi/growsurf_ruby/models/account_create_response.rbi
233
232
  - rbi/growsurf_ruby/models/affiliate_application.rbi
234
233
  - rbi/growsurf_ruby/models/affiliate_application_list_response.rbi
235
234
  - rbi/growsurf_ruby/models/affiliate_invite.rbi
@@ -237,12 +236,15 @@ files:
237
236
  - rbi/growsurf_ruby/models/analytics_availability.rbi
238
237
  - rbi/growsurf_ruby/models/analytics_unavailable_reason.rbi
239
238
  - rbi/growsurf_ruby/models/campaign.rbi
239
+ - rbi/growsurf_ruby/models/campaign/campaign_custom_domain.rbi
240
240
  - rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi
241
241
  - rbi/growsurf_ruby/models/campaign/commission_approve_params.rbi
242
242
  - rbi/growsurf_ruby/models/campaign/commission_approve_response.rbi
243
243
  - rbi/growsurf_ruby/models/campaign/commission_delete_params.rbi
244
244
  - rbi/growsurf_ruby/models/campaign/commission_delete_response.rbi
245
245
  - rbi/growsurf_ruby/models/campaign/create.rbi
246
+ - rbi/growsurf_ruby/models/campaign/custom_domain_set_params.rbi
247
+ - rbi/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rbi
246
248
  - rbi/growsurf_ruby/models/campaign/delete_program_resource_response.rbi
247
249
  - rbi/growsurf_ruby/models/campaign/delete_reward_response.rbi
248
250
  - rbi/growsurf_ruby/models/campaign/fraud_risk_level.rbi
@@ -350,9 +352,9 @@ files:
350
352
  - rbi/growsurf_ruby/models/team_rotate_api_key_response.rbi
351
353
  - rbi/growsurf_ruby/models/team_update_params.rbi
352
354
  - rbi/growsurf_ruby/request_options.rbi
353
- - rbi/growsurf_ruby/resources/account.rbi
354
355
  - rbi/growsurf_ruby/resources/campaign.rbi
355
356
  - rbi/growsurf_ruby/resources/campaign/commission.rbi
357
+ - rbi/growsurf_ruby/resources/campaign/custom_domain.rbi
356
358
  - rbi/growsurf_ruby/resources/campaign/design.rbi
357
359
  - rbi/growsurf_ruby/resources/campaign/emails.rbi
358
360
  - rbi/growsurf_ruby/resources/campaign/installation.rbi
@@ -384,8 +386,6 @@ files:
384
386
  - sig/growsurf_ruby/internal/type/unknown.rbs
385
387
  - sig/growsurf_ruby/internal/util.rbs
386
388
  - sig/growsurf_ruby/models.rbs
387
- - sig/growsurf_ruby/models/account_create_params.rbs
388
- - sig/growsurf_ruby/models/account_create_response.rbs
389
389
  - sig/growsurf_ruby/models/affiliate_application.rbs
390
390
  - sig/growsurf_ruby/models/affiliate_application_list_response.rbs
391
391
  - sig/growsurf_ruby/models/affiliate_invite.rbs
@@ -393,12 +393,15 @@ files:
393
393
  - sig/growsurf_ruby/models/analytics_availability.rbs
394
394
  - sig/growsurf_ruby/models/analytics_unavailable_reason.rbs
395
395
  - sig/growsurf_ruby/models/campaign.rbs
396
+ - sig/growsurf_ruby/models/campaign/campaign_custom_domain.rbs
396
397
  - sig/growsurf_ruby/models/campaign/campaign_reward_list_response.rbs
397
398
  - sig/growsurf_ruby/models/campaign/commission_approve_params.rbs
398
399
  - sig/growsurf_ruby/models/campaign/commission_approve_response.rbs
399
400
  - sig/growsurf_ruby/models/campaign/commission_delete_params.rbs
400
401
  - sig/growsurf_ruby/models/campaign/commission_delete_response.rbs
401
402
  - sig/growsurf_ruby/models/campaign/create.rbs
403
+ - sig/growsurf_ruby/models/campaign/custom_domain_set_params.rbs
404
+ - sig/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rbs
402
405
  - sig/growsurf_ruby/models/campaign/delete_program_resource_response.rbs
403
406
  - sig/growsurf_ruby/models/campaign/delete_reward_response.rbs
404
407
  - sig/growsurf_ruby/models/campaign/fraud_risk_level.rbs
@@ -506,9 +509,9 @@ files:
506
509
  - sig/growsurf_ruby/models/team_rotate_api_key_response.rbs
507
510
  - sig/growsurf_ruby/models/team_update_params.rbs
508
511
  - sig/growsurf_ruby/request_options.rbs
509
- - sig/growsurf_ruby/resources/account.rbs
510
512
  - sig/growsurf_ruby/resources/campaign.rbs
511
513
  - sig/growsurf_ruby/resources/campaign/commission.rbs
514
+ - sig/growsurf_ruby/resources/campaign/custom_domain.rbs
512
515
  - sig/growsurf_ruby/resources/campaign/design.rbs
513
516
  - sig/growsurf_ruby/resources/campaign/emails.rbs
514
517
  - sig/growsurf_ruby/resources/campaign/installation.rbs
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module GrowsurfRuby
4
- module Models
5
- # @see GrowsurfRuby::Resources::Account#create
6
- class AccountCreateParams < GrowsurfRuby::Internal::Type::BaseModel
7
- extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
8
- include GrowsurfRuby::Internal::Type::RequestParameters
9
-
10
- # @!attribute email
11
- # The email address for the new account. Personal emails and disposable email addresses are not accepted.
12
- #
13
- # @return [String]
14
- required :email, String
15
-
16
- # @!attribute company
17
- #
18
- # @return [String, nil]
19
- optional :company, String
20
-
21
- # @!attribute first_name
22
- #
23
- # @return [String, nil]
24
- optional :first_name, String, api_name: :firstName
25
-
26
- # @!attribute last_name
27
- #
28
- # @return [String, nil]
29
- optional :last_name, String, api_name: :lastName
30
-
31
- # @!method initialize(email:, company: nil, first_name: nil, last_name: nil, request_options: {})
32
- # Some parameter documentations has been truncated, see
33
- # {GrowsurfRuby::Models::AccountCreateParams} for more details.
34
- #
35
- # @param email [String] The email address for the new account. Personal emails and disposable email addresses are not accepted.
36
- #
37
- # @param company [String]
38
- #
39
- # @param first_name [String]
40
- #
41
- # @param last_name [String]
42
- #
43
- # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
44
- end
45
- end
46
- end
@@ -1,57 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module GrowsurfRuby
4
- module Models
5
- # @see GrowsurfRuby::Resources::Account#create
6
- class AccountCreateResponse < GrowsurfRuby::Internal::Type::BaseModel
7
- # @!attribute api_key
8
- # An API key for the new account. Use it as the `Bearer` token on subsequent requests. Locked (`403`
9
- # `EMAIL_NOT_VERIFIED_ERROR`) until the account's email is verified; verification unlocks this same
10
- # key, so keep it and retry. It is replaced only when the account owner first signs in to the GrowSurf
11
- # dashboard.
12
- #
13
- # @return [String]
14
- required :api_key, String, api_name: :apiKey
15
-
16
- # @!attribute email
17
- # Email address for the new account.
18
- #
19
- # @return [String]
20
- required :email, String
21
-
22
- # @!attribute verification_status
23
- # GrowSurf team verification state. `VERIFIED` is required before a program
24
- # can send participant emails.
25
- #
26
- # @return [Symbol, GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus]
27
- required :verification_status,
28
- enum: -> { GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus },
29
- api_name: :verificationStatus
30
-
31
- # @!method initialize(api_key:, email:, verification_status:)
32
- # Some parameter documentations has been truncated, see
33
- # {GrowsurfRuby::Models::AccountCreateResponse} for more details.
34
- #
35
- # @param api_key [String] An API key for the new account. Use it as the `Bearer` token on subsequent
36
- #
37
- # @param email [String]
38
- #
39
- # @param verification_status [Symbol, GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus] GrowSurf team verification state. `VERIFIED` is required before a program can
40
-
41
- # GrowSurf team verification state. `VERIFIED` is required before a program
42
- # can send participant emails.
43
- #
44
- # @see GrowsurfRuby::Models::AccountCreateResponse#verification_status
45
- module VerificationStatus
46
- extend GrowsurfRuby::Internal::Type::Enum
47
-
48
- NOT_REQUESTED = :NOT_REQUESTED
49
- REQUESTED = :REQUESTED
50
- VERIFIED = :VERIFIED
51
-
52
- # @!method self.values
53
- # @return [Array<Symbol>]
54
- end
55
- end
56
- end
57
- end
@@ -1,66 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module GrowsurfRuby
4
- module Resources
5
- class Account
6
- # Creates a new GrowSurf account. This is the only endpoint that does not require an API
7
- # key. Before calling it, an authorized account owner must review and approve GrowSurf's
8
- # [Terms of Service](https://growsurf.com/terms) and [Privacy
9
- # Policy](https://growsurf.com/privacy). The account starts a 14-day Business trial
10
- # without a credit card. The response includes an API key for the new account, shown once
11
- # in the response. The key is a secret: store it in a secret manager and do not put it in
12
- # logs, screenshots, URLs, model context, analytics, or generated output. A lost key
13
- # cannot be recovered through this API, so do not create an account here unless you can
14
- # store the key somewhere that outlives the current conversation. If you cannot, ask the
15
- # account owner to connect GrowSurf's hosted MCP server at `https://mcp.growsurf.com`
16
- # instead, which keeps the credential with your tool rather than in chat. The key is
17
- # locked until the team owner's email address is verified: authenticated program and
18
- # resource endpoints return a `403` with error code `EMAIL_NOT_VERIFIED_ERROR` until then
19
- # (resend the email via `POST /team/owner/verification-email`, then retry). Verification
20
- # unlocks this same key
21
- # - keep it and retry rather than requesting a replacement. A welcome email is
22
- # sent to the address with the verification link and a set-password link for
23
- # dashboard access. Accounts whose email is never verified are deleted
24
- # automatically after 7 days. Separately, for security, the API key is replaced
25
- # the first time the account owner signs in to the GrowSurf dashboard; email
26
- # verification does not trigger that, and the previous key then returns a `403`
27
- # with error code `NOT_AUTHORIZED_ERROR`. Some actions (such as emailing participants)
28
- # additionally require GrowSurf to verify the team first. Calling this endpoint
29
- # accepts those policies on the account holder's behalf.
30
- #
31
- # @overload create(email:, company: nil, first_name: nil, last_name: nil, request_options: {})
32
- #
33
- # @param email [String] The email address for the new GrowSurf account. Personal emails and disposable email addresses are not accepted.
34
- #
35
- # @param company [String] Company name for the new account.
36
- #
37
- # @param first_name [String] First name for the new account owner.
38
- #
39
- # @param last_name [String] Last name for the new account owner.
40
- #
41
- # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
42
- #
43
- # @return [GrowsurfRuby::Models::AccountCreateResponse]
44
- #
45
- # @see GrowsurfRuby::Models::AccountCreateParams
46
- def create(params)
47
- parsed, options = GrowsurfRuby::AccountCreateParams.dump_request(params)
48
- options[:extra_headers] = options[:extra_headers].to_h.merge("authorization" => nil)
49
- @client.request(
50
- method: :post,
51
- path: "accounts",
52
- body: parsed,
53
- model: GrowsurfRuby::Models::AccountCreateResponse,
54
- options: options
55
- )
56
- end
57
-
58
- # @api private
59
- #
60
- # @param client [GrowsurfRuby::Client]
61
- def initialize(client:)
62
- @client = client
63
- end
64
- end
65
- end
66
- end
@@ -1,73 +0,0 @@
1
- # typed: strong
2
-
3
- module GrowsurfRuby
4
- module Models
5
- class AccountCreateParams < GrowsurfRuby::Internal::Type::BaseModel
6
- extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
7
- include GrowsurfRuby::Internal::Type::RequestParameters
8
-
9
- OrHash =
10
- T.type_alias do
11
- T.any(
12
- GrowsurfRuby::AccountCreateParams,
13
- GrowsurfRuby::Internal::AnyHash
14
- )
15
- end
16
-
17
- # The email address for the new account. Personal emails and disposable email addresses are not accepted.
18
- sig { returns(String) }
19
- attr_accessor :email
20
-
21
- sig { returns(T.nilable(String)) }
22
- attr_reader :company
23
-
24
- sig { params(company: String).void }
25
- attr_writer :company
26
-
27
- sig { returns(T.nilable(String)) }
28
- attr_reader :first_name
29
-
30
- sig { params(first_name: String).void }
31
- attr_writer :first_name
32
-
33
- sig { returns(T.nilable(String)) }
34
- attr_reader :last_name
35
-
36
- sig { params(last_name: String).void }
37
- attr_writer :last_name
38
-
39
- sig do
40
- params(
41
- email: String,
42
- company: String,
43
- first_name: String,
44
- last_name: String,
45
- request_options: GrowsurfRuby::RequestOptions::OrHash
46
- ).returns(T.attached_class)
47
- end
48
- def self.new(
49
- # The email address for the new account. Personal emails and disposable email addresses are not accepted.
50
- email:,
51
- company: nil,
52
- first_name: nil,
53
- last_name: nil,
54
- request_options: {}
55
- )
56
- end
57
-
58
- sig do
59
- override.returns(
60
- {
61
- email: String,
62
- company: String,
63
- first_name: String,
64
- last_name: String,
65
- request_options: GrowsurfRuby::RequestOptions
66
- }
67
- )
68
- end
69
- def to_hash
70
- end
71
- end
72
- end
73
- end
@@ -1,107 +0,0 @@
1
- # typed: strong
2
-
3
- module GrowsurfRuby
4
- module Models
5
- class AccountCreateResponse < GrowsurfRuby::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(
9
- GrowsurfRuby::Models::AccountCreateResponse,
10
- GrowsurfRuby::Internal::AnyHash
11
- )
12
- end
13
-
14
- # An API key for the new account. Use it as the `Bearer` token on subsequent
15
- # requests. Locked (`403` `EMAIL_NOT_VERIFIED_ERROR`) until the account's email
16
- # is verified, and rotated when the account owner first signs in to the GrowSurf
17
- # dashboard.
18
- sig { returns(String) }
19
- attr_accessor :api_key
20
-
21
- sig { returns(String) }
22
- attr_accessor :email
23
-
24
- # GrowSurf account verification state. `VERIFIED` is required before a program
25
- # can send participant emails.
26
- sig do
27
- returns(
28
- GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
29
- )
30
- end
31
- attr_accessor :verification_status
32
-
33
- sig do
34
- params(
35
- api_key: String,
36
- email: String,
37
- verification_status:
38
- GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::OrSymbol
39
- ).returns(T.attached_class)
40
- end
41
- def self.new(
42
- # An API key for the new account. Use it as the `Bearer` token on subsequent
43
- # requests. Locked (`403` `EMAIL_NOT_VERIFIED_ERROR`) until the account's email
44
- # is verified, and rotated when the account owner first signs in to the GrowSurf
45
- # dashboard.
46
- api_key:,
47
- email:,
48
- # GrowSurf account verification state. `VERIFIED` is required before a program
49
- # can send participant emails.
50
- verification_status:
51
- )
52
- end
53
-
54
- sig do
55
- override.returns(
56
- {
57
- api_key: String,
58
- email: String,
59
- verification_status:
60
- GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
61
- }
62
- )
63
- end
64
- def to_hash
65
- end
66
-
67
- module VerificationStatus
68
- extend GrowsurfRuby::Internal::Type::Enum
69
-
70
- TaggedSymbol =
71
- T.type_alias do
72
- T.all(
73
- Symbol,
74
- GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus
75
- )
76
- end
77
- OrSymbol = T.type_alias { T.any(Symbol, String) }
78
-
79
- NOT_REQUESTED =
80
- T.let(
81
- :NOT_REQUESTED,
82
- GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
83
- )
84
- REQUESTED =
85
- T.let(
86
- :REQUESTED,
87
- GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
88
- )
89
- VERIFIED =
90
- T.let(
91
- :VERIFIED,
92
- GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
93
- )
94
-
95
- sig do
96
- override.returns(
97
- T::Array[
98
- GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
99
- ]
100
- )
101
- end
102
- def self.values
103
- end
104
- end
105
- end
106
- end
107
- end
@@ -1,46 +0,0 @@
1
- # typed: strong
2
-
3
- module GrowsurfRuby
4
- module Resources
5
- class Account
6
- # Creates a new GrowSurf account. This is the only endpoint that does not require
7
- # an API key. Before calling it, an authorized account owner must review and
8
- # approve GrowSurf's [Terms of Service](https://growsurf.com/terms) and [Privacy
9
- # Policy](https://growsurf.com/privacy). The account starts a 14-day Business
10
- # trial without a credit card. The response includes an API key for the new
11
- # account, shown once in the response. The key is a secret: store it in a secret
12
- # manager and do not put it in logs, screenshots, URLs, model context, analytics,
13
- # or generated output. The key is locked until the team owner's email address is
14
- # verified: authenticated program and resource endpoints return a `403` with error
15
- # code `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
16
- # /team/owner/verification-email`, then retry). A welcome email is sent to the
17
- # address with the verification link and a set-password link for dashboard access.
18
- # Accounts whose email is never verified are deleted automatically after 7 days.
19
- # For security, the API key is rotated the first time the account owner signs in
20
- # to the GrowSurf dashboard. Some actions (such as emailing participants)
21
- # additionally require GrowSurf to verify the team first. Calling this endpoint
22
- # accepts those policies on the account holder's behalf.
23
- sig do
24
- params(
25
- email: String,
26
- company: String,
27
- first_name: String,
28
- last_name: String,
29
- request_options: GrowsurfRuby::RequestOptions::OrHash
30
- ).returns(GrowsurfRuby::Models::AccountCreateResponse)
31
- end
32
- def create(
33
- email:,
34
- company: nil,
35
- first_name: nil,
36
- last_name: nil,
37
- request_options: {}
38
- )
39
- end
40
-
41
- sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
42
- def self.new(client:)
43
- end
44
- end
45
- end
46
- end
@@ -1,42 +0,0 @@
1
- module GrowsurfRuby
2
- module Models
3
- type account_create_params =
4
- { email: String, company: String, first_name: String, last_name: String }
5
- & GrowsurfRuby::Internal::Type::request_parameters
6
-
7
- class AccountCreateParams < GrowsurfRuby::Internal::Type::BaseModel
8
- extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
9
- include GrowsurfRuby::Internal::Type::RequestParameters
10
-
11
- attr_accessor email: String
12
-
13
- attr_reader company: String?
14
-
15
- def company=: (String) -> String
16
-
17
- attr_reader first_name: String?
18
-
19
- def first_name=: (String) -> String
20
-
21
- attr_reader last_name: String?
22
-
23
- def last_name=: (String) -> String
24
-
25
- def initialize: (
26
- email: String,
27
- ?company: String,
28
- ?first_name: String,
29
- ?last_name: String,
30
- ?request_options: GrowsurfRuby::request_opts
31
- ) -> void
32
-
33
- def to_hash: -> {
34
- email: String,
35
- company: String,
36
- first_name: String,
37
- last_name: String,
38
- request_options: GrowsurfRuby::RequestOptions
39
- }
40
- end
41
- end
42
- end
@@ -1,42 +0,0 @@
1
- module GrowsurfRuby
2
- module Models
3
- type account_create_response =
4
- {
5
- api_key: String,
6
- email: String,
7
- verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
8
- }
9
-
10
- class AccountCreateResponse < GrowsurfRuby::Internal::Type::BaseModel
11
- attr_accessor api_key: String
12
-
13
- attr_accessor email: String
14
-
15
- attr_accessor verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
16
-
17
- def initialize: (
18
- api_key: String,
19
- email: String,
20
- verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
21
- ) -> void
22
-
23
- def to_hash: -> {
24
- api_key: String,
25
- email: String,
26
- verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
27
- }
28
-
29
- type verification_status = :NOT_REQUESTED | :REQUESTED | :VERIFIED
30
-
31
- module VerificationStatus
32
- extend GrowsurfRuby::Internal::Type::Enum
33
-
34
- NOT_REQUESTED: :NOT_REQUESTED
35
- REQUESTED: :REQUESTED
36
- VERIFIED: :VERIFIED
37
-
38
- def self?.values: -> ::Array[GrowsurfRuby::Models::AccountCreateResponse::verification_status]
39
- end
40
- end
41
- end
42
- end
@@ -1,15 +0,0 @@
1
- module GrowsurfRuby
2
- module Resources
3
- class Account
4
- def create: (
5
- email: String,
6
- ?company: String,
7
- ?first_name: String,
8
- ?last_name: String,
9
- ?request_options: GrowsurfRuby::request_opts
10
- ) -> GrowsurfRuby::Models::AccountCreateResponse
11
-
12
- def initialize: (client: GrowsurfRuby::Client) -> void
13
- end
14
- end
15
- end