growsurf-ruby 1.0.0 → 1.1.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 (137) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/lib/growsurf_ruby/client.rb +4 -0
  5. data/lib/growsurf_ruby/models/account.rb +90 -0
  6. data/lib/growsurf_ruby/models/account_create_params.rb +46 -0
  7. data/lib/growsurf_ruby/models/account_create_response.rb +64 -0
  8. data/lib/growsurf_ruby/models/account_resend_verification_email_response.rb +33 -0
  9. data/lib/growsurf_ruby/models/account_rotate_api_key_response.rb +17 -0
  10. data/lib/growsurf_ruby/models/account_update_params.rb +35 -0
  11. data/lib/growsurf_ruby/models/campaign/campaign_reward_list_response.rb +2 -2
  12. data/lib/growsurf_ruby/models/campaign/create.rb +5 -1
  13. data/lib/growsurf_ruby/models/campaign/participant_activity_logs_response.rb +65 -0
  14. data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +421 -0
  15. data/lib/growsurf_ruby/models/campaign/participant_bulk_delete_params.rb +35 -0
  16. data/lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb +151 -0
  17. data/lib/growsurf_ruby/models/campaign/participant_email_params.rb +76 -0
  18. data/lib/growsurf_ruby/models/campaign/participant_email_response.rb +38 -0
  19. data/lib/growsurf_ruby/models/campaign/participant_list_activity_logs_params.rb +46 -0
  20. data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +98 -0
  21. data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +21 -1
  22. data/lib/growsurf_ruby/models/campaign/reward.rb +17 -6
  23. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +25 -15
  24. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +25 -15
  25. data/lib/growsurf_ruby/models/campaign/webhook.rb +72 -0
  26. data/lib/growsurf_ruby/models/campaign/webhook_create_params.rb +52 -0
  27. data/lib/growsurf_ruby/models/campaign/webhook_delete_params.rb +28 -0
  28. data/lib/growsurf_ruby/models/campaign/webhook_delete_response.rb +24 -0
  29. data/lib/growsurf_ruby/models/campaign/webhook_event.rb +23 -0
  30. data/lib/growsurf_ruby/models/campaign/webhook_list_response.rb +18 -0
  31. data/lib/growsurf_ruby/models/campaign/webhook_test_params.rb +42 -0
  32. data/lib/growsurf_ruby/models/campaign/webhook_test_response.rb +50 -0
  33. data/lib/growsurf_ruby/models/campaign/webhook_update_params.rb +59 -0
  34. data/lib/growsurf_ruby/models/campaign.rb +17 -6
  35. data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +36 -1
  36. data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +538 -1
  37. data/lib/growsurf_ruby/models/campaign_update_params.rb +0 -3
  38. data/lib/growsurf_ruby/models/commission_structure.rb +8 -2
  39. data/lib/growsurf_ruby/models/referral_flow_screenshots_response.rb +72 -0
  40. data/lib/growsurf_ruby/models.rb +8 -0
  41. data/lib/growsurf_ruby/resources/account.rb +159 -0
  42. data/lib/growsurf_ruby/resources/campaign/design.rb +9 -7
  43. data/lib/growsurf_ruby/resources/campaign/emails.rb +8 -5
  44. data/lib/growsurf_ruby/resources/campaign/installation.rb +8 -6
  45. data/lib/growsurf_ruby/resources/campaign/options.rb +8 -5
  46. data/lib/growsurf_ruby/resources/campaign/participant.rb +170 -2
  47. data/lib/growsurf_ruby/resources/campaign/rewards.rb +17 -21
  48. data/lib/growsurf_ruby/resources/campaign/webhooks.rb +157 -0
  49. data/lib/growsurf_ruby/resources/campaign.rb +30 -2
  50. data/lib/growsurf_ruby/version.rb +1 -1
  51. data/lib/growsurf_ruby.rb +26 -0
  52. data/rbi/growsurf_ruby/client.rbi +3 -0
  53. data/rbi/growsurf_ruby/models/account.rbi +125 -0
  54. data/rbi/growsurf_ruby/models/account_create_params.rbi +73 -0
  55. data/rbi/growsurf_ruby/models/account_create_response.rbi +115 -0
  56. data/rbi/growsurf_ruby/models/account_resend_verification_email_response.rbi +76 -0
  57. data/rbi/growsurf_ruby/models/account_rotate_api_key_response.rbi +30 -0
  58. data/rbi/growsurf_ruby/models/account_update_params.rbi +65 -0
  59. data/rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi +2 -2
  60. data/rbi/growsurf_ruby/models/campaign/create.rbi +8 -0
  61. data/rbi/growsurf_ruby/models/campaign/participant_activity_logs_response.rbi +111 -0
  62. data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +630 -0
  63. data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_params.rbi +56 -0
  64. data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbi +285 -0
  65. data/rbi/growsurf_ruby/models/campaign/participant_email_params.rbi +118 -0
  66. data/rbi/growsurf_ruby/models/campaign/participant_email_response.rbi +84 -0
  67. data/rbi/growsurf_ruby/models/campaign/participant_list_activity_logs_params.rbi +74 -0
  68. data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +207 -0
  69. data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +24 -0
  70. data/rbi/growsurf_ruby/models/campaign/reward.rbi +25 -4
  71. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +34 -9
  72. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +34 -9
  73. data/rbi/growsurf_ruby/models/campaign/webhook.rbi +93 -0
  74. data/rbi/growsurf_ruby/models/campaign/webhook_create_params.rbi +91 -0
  75. data/rbi/growsurf_ruby/models/campaign/webhook_delete_params.rbi +48 -0
  76. data/rbi/growsurf_ruby/models/campaign/webhook_delete_response.rbi +33 -0
  77. data/rbi/growsurf_ruby/models/campaign/webhook_event.rbi +60 -0
  78. data/rbi/growsurf_ruby/models/campaign/webhook_list_response.rbi +36 -0
  79. data/rbi/growsurf_ruby/models/campaign/webhook_test_params.rbi +69 -0
  80. data/rbi/growsurf_ruby/models/campaign/webhook_test_response.rbi +102 -0
  81. data/rbi/growsurf_ruby/models/campaign/webhook_update_params.rbi +98 -0
  82. data/rbi/growsurf_ruby/models/campaign.rbi +25 -4
  83. data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +91 -0
  84. data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +1011 -3
  85. data/rbi/growsurf_ruby/models/campaign_update_params.rbi +0 -15
  86. data/rbi/growsurf_ruby/models/commission_structure.rbi +8 -2
  87. data/rbi/growsurf_ruby/models/referral_flow_screenshots_response.rbi +94 -0
  88. data/rbi/growsurf_ruby/models.rbi +9 -0
  89. data/rbi/growsurf_ruby/resources/account.rbi +112 -0
  90. data/rbi/growsurf_ruby/resources/campaign/design.rbi +7 -5
  91. data/rbi/growsurf_ruby/resources/campaign/emails.rbi +7 -5
  92. data/rbi/growsurf_ruby/resources/campaign/installation.rbi +7 -4
  93. data/rbi/growsurf_ruby/resources/campaign/options.rbi +7 -5
  94. data/rbi/growsurf_ruby/resources/campaign/participant.rbi +160 -0
  95. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +37 -21
  96. data/rbi/growsurf_ruby/resources/campaign/webhooks.rbi +123 -0
  97. data/rbi/growsurf_ruby/resources/campaign.rbi +33 -2
  98. data/sig/growsurf_ruby/client.rbs +2 -0
  99. data/sig/growsurf_ruby/models/account.rbs +67 -0
  100. data/sig/growsurf_ruby/models/account_create_params.rbs +42 -0
  101. data/sig/growsurf_ruby/models/account_create_response.rbs +47 -0
  102. data/sig/growsurf_ruby/models/account_resend_verification_email_response.rbs +35 -0
  103. data/sig/growsurf_ruby/models/account_rotate_api_key_response.rbs +13 -0
  104. data/sig/growsurf_ruby/models/account_update_params.rbs +42 -0
  105. data/sig/growsurf_ruby/models/campaign/participant_activity_logs_response.rbs +59 -0
  106. data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +407 -0
  107. data/sig/growsurf_ruby/models/campaign/participant_bulk_delete_params.rbs +30 -0
  108. data/sig/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbs +125 -0
  109. data/sig/growsurf_ruby/models/campaign/participant_email_params.rbs +61 -0
  110. data/sig/growsurf_ruby/models/campaign/participant_email_response.rbs +37 -0
  111. data/sig/growsurf_ruby/models/campaign/participant_list_activity_logs_params.rbs +47 -0
  112. data/sig/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbs +90 -0
  113. data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +14 -0
  114. data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +0 -7
  115. data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +0 -7
  116. data/sig/growsurf_ruby/models/campaign/webhook.rbs +52 -0
  117. data/sig/growsurf_ruby/models/campaign/webhook_create_params.rbs +51 -0
  118. data/sig/growsurf_ruby/models/campaign/webhook_delete_params.rbs +30 -0
  119. data/sig/growsurf_ruby/models/campaign/webhook_delete_response.rbs +17 -0
  120. data/sig/growsurf_ruby/models/campaign/webhook_event.rbs +28 -0
  121. data/sig/growsurf_ruby/models/campaign/webhook_list_response.rbs +18 -0
  122. data/sig/growsurf_ruby/models/campaign/webhook_test_params.rbs +42 -0
  123. data/sig/growsurf_ruby/models/campaign/webhook_test_response.rbs +54 -0
  124. data/sig/growsurf_ruby/models/campaign/webhook_update_params.rbs +63 -0
  125. data/sig/growsurf_ruby/models/campaign_retrieve_analytics_params.rbs +35 -1
  126. data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +533 -3
  127. data/sig/growsurf_ruby/models/campaign_update_params.rbs +1 -4
  128. data/sig/growsurf_ruby/models/commission_structure.rbs +7 -2
  129. data/sig/growsurf_ruby/models/referral_flow_screenshots_response.rbs +54 -0
  130. data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +4 -1
  131. data/sig/growsurf_ruby/models.rbs +8 -0
  132. data/sig/growsurf_ruby/resources/account.rbs +38 -0
  133. data/sig/growsurf_ruby/resources/campaign/participant.rbs +37 -0
  134. data/sig/growsurf_ruby/resources/campaign/rewards.rbs +0 -2
  135. data/sig/growsurf_ruby/resources/campaign/webhooks.rbs +46 -0
  136. data/sig/growsurf_ruby/resources/campaign.rbs +9 -0
  137. metadata +80 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f01d0f2cb2534783b61dc721b1fde1d8f4465951558a08e474a2c0816b55785
4
- data.tar.gz: bc309ac0246f6ee795ccb48487c37f366c3e04293cdc9f3fea0ef55c8a8576e0
3
+ metadata.gz: fcb7132df27f55fa865460e439a8f461ff5d039b0bc3100b052e1075820a7fe1
4
+ data.tar.gz: 8d7e3c55e11ee1a6963845234ec97e2fb52c622682029a68021a77243ea7625f
5
5
  SHA512:
6
- metadata.gz: bf7d990bbf244492889bdb83c07478bee329598a80eaf4bb48a9445fb322fcdd10fa1a7854a19c8f5dee29f4277d7a3a13c557f5329ebada1309ba7f7a299461
7
- data.tar.gz: 4157fc3ebf661d9a92f4713b9f10d91f1f31f6d298449684c5f01946c85909eb3fbf02aefff7399282d7d9c81f124878543806cc307629752105c7156355c1cc
6
+ metadata.gz: 987fef5597c1023a9e38ade57af6eca87941bac68e020218ba5c98de77c37e55d14276b635da9bc5e3db02b301e765d98aa1ccaa27df02bc4112ae035fb56973
7
+ data.tar.gz: 0cbd34d217187beb4ea216f81c179e8f9c0a670e7965cc17ba95ae197766b603b0143e75c4c8eb4ef07c3e8435165272a81737c03d38c176842e7dc6ae39158d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.0](https://github.com/growsurf/growsurf-ruby/compare/v1.0.0...v1.1.0) (2026-07-08)
4
+
5
+
6
+ ### Features
7
+
8
+ * add account webhook and participant APIs ([11738ff](https://github.com/growsurf/growsurf-ruby/commit/11738ffa7138ff8468c4b6c1b4d355c9ae8706b7))
9
+
3
10
  ## [1.0.0](https://github.com/growsurf/growsurf-ruby/compare/v0.8.0...v1.0.0) (2026-07-03)
4
11
 
5
12
 
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.0.0"
20
+ gem "growsurf-ruby", "~> 1.1.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -19,6 +19,9 @@ module GrowsurfRuby
19
19
  # @return [String]
20
20
  attr_reader :api_key
21
21
 
22
+ # @return [GrowsurfRuby::Resources::Account]
23
+ attr_reader :account
24
+
22
25
  # @return [GrowsurfRuby::Resources::Campaign]
23
26
  attr_reader :campaign
24
27
 
@@ -84,6 +87,7 @@ module GrowsurfRuby
84
87
  headers: headers
85
88
  )
86
89
 
90
+ @account = GrowsurfRuby::Resources::Account.new(client: self)
87
91
  @campaign = GrowsurfRuby::Resources::Campaign.new(client: self)
88
92
  end
89
93
  end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ # @see GrowsurfRuby::Resources::Account#retrieve
6
+ class Account < GrowsurfRuby::Internal::Type::BaseModel
7
+ # @!attribute email
8
+ #
9
+ # @return [String]
10
+ required :email, String
11
+
12
+ # @!attribute id
13
+ # The account's unique identifier.
14
+ #
15
+ # @return [String]
16
+ required :id, String
17
+
18
+ # @!attribute verification_status
19
+ # GrowSurf-team verification state. `VERIFIED` is required before a program can
20
+ # send participant emails.
21
+ #
22
+ # @return [Symbol, GrowsurfRuby::Models::Account::VerificationStatus]
23
+ required :verification_status,
24
+ enum: -> { GrowsurfRuby::Account::VerificationStatus },
25
+ api_name: :verificationStatus
26
+
27
+ # @!attribute company
28
+ #
29
+ # @return [String, nil]
30
+ optional :company, String, nil?: true
31
+
32
+ # @!attribute created_at
33
+ # When the account was created, as a Unix timestamp in milliseconds.
34
+ #
35
+ # @return [Integer, nil]
36
+ optional :created_at, Integer, api_name: :createdAt, nil?: true
37
+
38
+ # @!attribute first_name
39
+ #
40
+ # @return [String, nil]
41
+ optional :first_name, String, api_name: :firstName, nil?: true
42
+
43
+ # @!attribute last_name
44
+ #
45
+ # @return [String, nil]
46
+ optional :last_name, String, api_name: :lastName, nil?: true
47
+
48
+ # @!attribute verification_requested_at
49
+ # When team verification was last requested, as a Unix timestamp in milliseconds.
50
+ #
51
+ # @return [Integer, nil]
52
+ optional :verification_requested_at, Integer, api_name: :verificationRequestedAt, nil?: true
53
+
54
+ # @!method initialize(email:, id:, verification_status:, company: nil, created_at: nil, first_name: nil, last_name: nil, verification_requested_at: nil)
55
+ # Some parameter documentations has been truncated, see
56
+ # {GrowsurfRuby::Models::Account} for more details.
57
+ #
58
+ # @param email [String]
59
+ #
60
+ # @param id [String] The account's unique identifier.
61
+ #
62
+ # @param verification_status [Symbol, GrowsurfRuby::Models::Account::VerificationStatus] GrowSurf-team verification state. `VERIFIED` is required before a program can send
63
+ #
64
+ # @param company [String, nil]
65
+ #
66
+ # @param created_at [Integer, nil] When the account was created, as a Unix timestamp in milliseconds.
67
+ #
68
+ # @param first_name [String, nil]
69
+ #
70
+ # @param last_name [String, nil]
71
+ #
72
+ # @param verification_requested_at [Integer, nil] When team verification was last requested, as a Unix timestamp in milliseconds.
73
+
74
+ # GrowSurf-team verification state. `VERIFIED` is required before a program can
75
+ # send participant emails.
76
+ #
77
+ # @see GrowsurfRuby::Models::Account#verification_status
78
+ module VerificationStatus
79
+ extend GrowsurfRuby::Internal::Type::Enum
80
+
81
+ NOT_REQUESTED = :NOT_REQUESTED
82
+ REQUESTED = :REQUESTED
83
+ VERIFIED = :VERIFIED
84
+
85
+ # @!method self.values
86
+ # @return [Array<Symbol>]
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,46 @@
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
@@ -0,0 +1,64 @@
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
9
+ # requests. Locked (`403` `EMAIL_NOT_VERIFIED_ERROR`) until the account's email
10
+ # is verified, and rotated 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
+ #
18
+ # @return [String]
19
+ required :email, String
20
+
21
+ # @!attribute id
22
+ # The new account's unique identifier.
23
+ #
24
+ # @return [String]
25
+ required :id, String
26
+
27
+ # @!attribute verification_status
28
+ # GrowSurf account verification state. `VERIFIED` is required before a program
29
+ # can send participant emails.
30
+ #
31
+ # @return [Symbol, GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus]
32
+ required :verification_status,
33
+ enum: -> { GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus },
34
+ api_name: :verificationStatus
35
+
36
+ # @!method initialize(api_key:, email:, id:, verification_status:)
37
+ # Some parameter documentations has been truncated, see
38
+ # {GrowsurfRuby::Models::AccountCreateResponse} for more details.
39
+ #
40
+ # @param api_key [String] An API key for the new account. Use it as the `Bearer` token on subsequent
41
+ #
42
+ # @param email [String]
43
+ #
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
47
+
48
+ # GrowSurf account verification state. `VERIFIED` is required before a program
49
+ # can send participant emails.
50
+ #
51
+ # @see GrowsurfRuby::Models::AccountCreateResponse#verification_status
52
+ module VerificationStatus
53
+ extend GrowsurfRuby::Internal::Type::Enum
54
+
55
+ NOT_REQUESTED = :NOT_REQUESTED
56
+ REQUESTED = :REQUESTED
57
+ VERIFIED = :VERIFIED
58
+
59
+ # @!method self.values
60
+ # @return [Array<Symbol>]
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ # @see GrowsurfRuby::Resources::Account#resend_verification_email
6
+ class AccountResendVerificationEmailResponse < GrowsurfRuby::Internal::Type::BaseModel
7
+ # @!attribute status
8
+ #
9
+ # @return [Symbol, GrowsurfRuby::Models::AccountResendVerificationEmailResponse::Status]
10
+ required :status, enum: -> { GrowsurfRuby::Models::AccountResendVerificationEmailResponse::Status }
11
+
12
+ # @!attribute success
13
+ #
14
+ # @return [Boolean]
15
+ required :success, GrowsurfRuby::Internal::Type::Boolean
16
+
17
+ # @!method initialize(status:, success:)
18
+ # @param status [Symbol, GrowsurfRuby::Models::AccountResendVerificationEmailResponse::Status]
19
+ #
20
+ # @param success [Boolean]
21
+
22
+ # @see GrowsurfRuby::Models::AccountResendVerificationEmailResponse#status
23
+ module Status
24
+ extend GrowsurfRuby::Internal::Type::Enum
25
+
26
+ SENT = :SENT
27
+
28
+ # @!method self.values
29
+ # @return [Array<Symbol>]
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ # @see GrowsurfRuby::Resources::Account#rotate_api_key
6
+ class AccountRotateAPIKeyResponse < GrowsurfRuby::Internal::Type::BaseModel
7
+ # @!attribute api_key
8
+ # The new API key. The previous key is revoked immediately.
9
+ #
10
+ # @return [String]
11
+ required :api_key, String, api_name: :apiKey
12
+
13
+ # @!method initialize(api_key:)
14
+ # @param api_key [String] The new API key. The previous key is revoked immediately.
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ # @see GrowsurfRuby::Resources::Account#update
6
+ class AccountUpdateParams < GrowsurfRuby::Internal::Type::BaseModel
7
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
8
+ include GrowsurfRuby::Internal::Type::RequestParameters
9
+
10
+ # @!attribute company
11
+ #
12
+ # @return [String, nil]
13
+ optional :company, String
14
+
15
+ # @!attribute first_name
16
+ #
17
+ # @return [String, nil]
18
+ optional :first_name, String, api_name: :firstName
19
+
20
+ # @!attribute last_name
21
+ #
22
+ # @return [String, nil]
23
+ optional :last_name, String, api_name: :lastName
24
+
25
+ # @!method initialize(company: nil, first_name: nil, last_name: nil, request_options: {})
26
+ # @param company [String]
27
+ #
28
+ # @param first_name [String]
29
+ #
30
+ # @param last_name [String]
31
+ #
32
+ # @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
33
+ end
34
+ end
35
+ end
@@ -6,7 +6,7 @@ module GrowsurfRuby
6
6
  # @see GrowsurfRuby::Resources::Campaign::Rewards#list
7
7
  class CampaignRewardListResponse < GrowsurfRuby::Internal::Type::BaseModel
8
8
  # @!attribute rewards
9
- # The program's active, visible, and enabled rewards.
9
+ # The program's configured rewards.
10
10
  #
11
11
  # @return [Array<GrowsurfRuby::Models::Campaign::Reward>]
12
12
  required :rewards, -> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::Reward] }
@@ -14,7 +14,7 @@ module GrowsurfRuby
14
14
  # @!method initialize(rewards:)
15
15
  # The list of a program's configured rewards.
16
16
  #
17
- # @param rewards [Array<GrowsurfRuby::Models::Campaign::Reward>] The program's active, visible, and enabled rewards.
17
+ # @param rewards [Array<GrowsurfRuby::Models::Campaign::Reward>] The program's configured rewards.
18
18
  end
19
19
  end
20
20
  end
@@ -44,6 +44,10 @@ module GrowsurfRuby
44
44
  optional :mobile_instance_id, String, api_name: :mobileInstanceId
45
45
 
46
46
  # @!attribute referral_status
47
+ # The referral credit status; only meaningful when `referred_by` resolves to a
48
+ # referrer. When omitted it is derived from the program's referral trigger
49
+ # (`CREDIT_AWARDED`, `CREDIT_PENDING`, or `CREDIT_EXPIRED`); left unset when no
50
+ # referrer resolves.
47
51
  #
48
52
  # @return [Symbol, GrowsurfRuby::Models::Campaign::Create::ReferralStatus, nil]
49
53
  optional :referral_status,
@@ -74,7 +78,7 @@ module GrowsurfRuby
74
78
  #
75
79
  # @param mobile_instance_id [String] Optional app-install scoped identifier for native mobile anti-fraud. Recommended
76
80
  #
77
- # @param referral_status [Symbol, GrowsurfRuby::Models::Campaign::Create::ReferralStatus]
81
+ # @param referral_status [Symbol, GrowsurfRuby::Models::Campaign::Create::ReferralStatus] The referral credit status; only meaningful when `referred_by` resolves to a ref
78
82
  #
79
83
  # @param referred_by [String] Referrer participant ID or email address.
80
84
 
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Participant#list_activity_logs
7
+ class ParticipantActivityLogsResponse < GrowsurfRuby::Internal::Type::BaseModel
8
+ # @!attribute activity_logs
9
+ #
10
+ # @return [Array<GrowsurfRuby::Models::Campaign::ParticipantActivityLogsResponse::ActivityLog>]
11
+ required :activity_logs,
12
+ -> {
13
+ GrowsurfRuby::Internal::Type::ArrayOf[
14
+ GrowsurfRuby::Campaign::ParticipantActivityLogsResponse::ActivityLog
15
+ ]
16
+ },
17
+ api_name: :activityLogs
18
+
19
+ # @!attribute limit
20
+ #
21
+ # @return [Integer]
22
+ required :limit, Integer
23
+
24
+ # @!attribute offset
25
+ # The offset for the next page, or null when there are no more logs.
26
+ #
27
+ # @return [Integer, nil]
28
+ optional :offset, Integer, nil?: true
29
+
30
+ # @!method initialize(activity_logs:, limit:, offset: nil)
31
+ # @param activity_logs [Array<GrowsurfRuby::Models::Campaign::ParticipantActivityLogsResponse::ActivityLog>]
32
+ #
33
+ # @param limit [Integer]
34
+ #
35
+ # @param offset [Integer, nil] The offset for the next page, or null when there are no more logs.
36
+
37
+ class ActivityLog < GrowsurfRuby::Internal::Type::BaseModel
38
+ # @!attribute created_at
39
+ # When the activity occurred, as a Unix timestamp in milliseconds.
40
+ #
41
+ # @return [Integer]
42
+ required :created_at, Integer, api_name: :createdAt
43
+
44
+ # @!attribute text
45
+ #
46
+ # @return [String]
47
+ required :text, String
48
+
49
+ # @!attribute type
50
+ # The activity family (e.g. `REFERRAL`, `SHARE`, `REWARD`, `EMAIL`, `COMMON`).
51
+ #
52
+ # @return [String]
53
+ required :type, String
54
+
55
+ # @!method initialize(created_at:, text:, type:)
56
+ # @param created_at [Integer] When the activity occurred, as a Unix timestamp in milliseconds.
57
+ #
58
+ # @param text [String]
59
+ #
60
+ # @param type [String] The activity family (e.g. `REFERRAL`, `SHARE`, `REWARD`, `EMAIL`, `COMMON`).
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end