growsurf-ruby 0.0.2 → 0.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/models/campaign/participant_create_mobile_token_params.rb +28 -0
- data/lib/growsurf_ruby/models/campaign/participant_create_mobile_token_response.rb +27 -0
- data/lib/growsurf_ruby/resources/campaign/participant.rb +28 -0
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +2 -0
- data/rbi/growsurf_ruby/models/campaign/participant_create_mobile_token_params.rbi +48 -0
- data/rbi/growsurf_ruby/models/campaign/participant_create_mobile_token_response.rbi +44 -0
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +20 -0
- data/sig/growsurf_ruby/models/campaign/participant_create_mobile_token_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/participant_create_mobile_token_response.rbs +18 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +6 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b695991934725f667e1087817f8b8f8137927a6841eac0fc44019db919ecbc74
|
|
4
|
+
data.tar.gz: b7023a64793f017a52e74c1af3b14c08ab38bb7a212936df7c57edc3c0cb8e1f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f96b5eab31efacdc595c90b94b3ed939b7d7a765d7c10780ab93933568c422bf358c0f6cfcf166077b88b52d751d867061f75520105925b09ed67d0babbd1ea
|
|
7
|
+
data.tar.gz: ae63669ebf23c619706c5d4cc1f6767e87dcebce18e725761774e96d2df0dff78b4a1f5deaf7da345c04990f7be560a20892ca7602c8cdaf087a0ef3176a1f32
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.1 (2026-05-13)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0...v0.1.1](https://github.com/growsurf/growsurf-ruby/compare/v0.1.0...v0.1.1)
|
|
6
|
+
|
|
7
|
+
## 0.1.0 (2026-05-12)
|
|
8
|
+
|
|
9
|
+
Full Changelog: [v0.0.2...v0.1.0](https://github.com/growsurf/growsurf-ruby/compare/v0.0.2...v0.1.0)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **api:** manual updates ([a827e1f](https://github.com/growsurf/growsurf-ruby/commit/a827e1f31b9e1b06212e33c9ba6ae095582b4f8b))
|
|
14
|
+
|
|
3
15
|
## 0.0.2 (2026-05-08)
|
|
4
16
|
|
|
5
17
|
Full Changelog: [v0.0.1...v0.0.2](https://github.com/growsurf/growsurf-ruby/compare/v0.0.1...v0.0.2)
|
data/README.md
CHANGED
|
@@ -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#create_mobile_token
|
|
7
|
+
class ParticipantCreateMobileTokenParams < 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,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Participant#create_mobile_token
|
|
7
|
+
class ParticipantCreateMobileTokenResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute expires_in
|
|
9
|
+
# Token lifetime in seconds.
|
|
10
|
+
#
|
|
11
|
+
# @return [Integer]
|
|
12
|
+
required :expires_in, Integer, api_name: :expiresIn
|
|
13
|
+
|
|
14
|
+
# @!attribute participant_token
|
|
15
|
+
# Participant-scoped bearer token for GrowSurf mobile SDK participant endpoints.
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :participant_token, String, api_name: :participantToken
|
|
19
|
+
|
|
20
|
+
# @!method initialize(expires_in:, participant_token:)
|
|
21
|
+
# @param expires_in [Integer] Token lifetime in seconds.
|
|
22
|
+
#
|
|
23
|
+
# @param participant_token [String] Participant-scoped bearer token for GrowSurf mobile SDK participant endpoints.
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -141,6 +141,34 @@ module GrowsurfRuby
|
|
|
141
141
|
)
|
|
142
142
|
end
|
|
143
143
|
|
|
144
|
+
# Creates a participant-scoped token for GrowSurf mobile SDK participant
|
|
145
|
+
# endpoints. The program must have mobile SDK access enabled.
|
|
146
|
+
#
|
|
147
|
+
# @overload create_mobile_token(participant_id_or_email, id:, request_options: {})
|
|
148
|
+
#
|
|
149
|
+
# @param participant_id_or_email [String] GrowSurf participant ID or URL-encoded participant email address.
|
|
150
|
+
#
|
|
151
|
+
# @param id [String] GrowSurf program ID.
|
|
152
|
+
#
|
|
153
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
154
|
+
#
|
|
155
|
+
# @return [GrowsurfRuby::Models::Campaign::ParticipantCreateMobileTokenResponse]
|
|
156
|
+
#
|
|
157
|
+
# @see GrowsurfRuby::Models::Campaign::ParticipantCreateMobileTokenParams
|
|
158
|
+
def create_mobile_token(participant_id_or_email, params)
|
|
159
|
+
parsed, options = GrowsurfRuby::Campaign::ParticipantCreateMobileTokenParams.dump_request(params)
|
|
160
|
+
id =
|
|
161
|
+
parsed.delete(:id) do
|
|
162
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
163
|
+
end
|
|
164
|
+
@client.request(
|
|
165
|
+
method: :post,
|
|
166
|
+
path: ["campaign/%1$s/participant/%2$s/mobile-token", id, participant_id_or_email],
|
|
167
|
+
model: GrowsurfRuby::Models::Campaign::ParticipantCreateMobileTokenResponse,
|
|
168
|
+
options: options
|
|
169
|
+
)
|
|
170
|
+
end
|
|
171
|
+
|
|
144
172
|
# Retrieves a paged list of commissions earned by a participant.
|
|
145
173
|
#
|
|
146
174
|
# @overload list_commissions(participant_id_or_email, id:, limit: nil, next_id: nil, status: nil, request_options: {})
|
data/lib/growsurf_ruby.rb
CHANGED
|
@@ -59,6 +59,8 @@ require_relative "growsurf_ruby/models/campaign/commission_delete_params"
|
|
|
59
59
|
require_relative "growsurf_ruby/models/campaign/commission_delete_response"
|
|
60
60
|
require_relative "growsurf_ruby/models/campaign/fraud_risk_level"
|
|
61
61
|
require_relative "growsurf_ruby/models/campaign/participant_add_params"
|
|
62
|
+
require_relative "growsurf_ruby/models/campaign/participant_create_mobile_token_params"
|
|
63
|
+
require_relative "growsurf_ruby/models/campaign/participant_create_mobile_token_response"
|
|
62
64
|
require_relative "growsurf_ruby/models/campaign/participant_delete_params"
|
|
63
65
|
require_relative "growsurf_ruby/models/campaign/participant_delete_response"
|
|
64
66
|
require_relative "growsurf_ruby/models/campaign/participant_list_commissions_params"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ParticipantCreateMobileTokenParams < 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::ParticipantCreateMobileTokenParams,
|
|
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,44 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ParticipantCreateMobileTokenResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
GrowsurfRuby::Models::Campaign::ParticipantCreateMobileTokenResponse,
|
|
11
|
+
GrowsurfRuby::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Token lifetime in seconds.
|
|
16
|
+
sig { returns(Integer) }
|
|
17
|
+
attr_accessor :expires_in
|
|
18
|
+
|
|
19
|
+
# Participant-scoped bearer token for GrowSurf mobile SDK participant endpoints.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :participant_token
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(expires_in: Integer, participant_token: String).returns(
|
|
25
|
+
T.attached_class
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
def self.new(
|
|
29
|
+
# Token lifetime in seconds.
|
|
30
|
+
expires_in:,
|
|
31
|
+
# Participant-scoped bearer token for GrowSurf mobile SDK participant endpoints.
|
|
32
|
+
participant_token:
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
override.returns({ expires_in: Integer, participant_token: String })
|
|
38
|
+
end
|
|
39
|
+
def to_hash
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -114,6 +114,26 @@ module GrowsurfRuby
|
|
|
114
114
|
)
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
+
# Creates a participant-scoped token for GrowSurf mobile SDK participant
|
|
118
|
+
# endpoints. The program must have mobile SDK access enabled.
|
|
119
|
+
sig do
|
|
120
|
+
params(
|
|
121
|
+
participant_id_or_email: String,
|
|
122
|
+
id: String,
|
|
123
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
124
|
+
).returns(
|
|
125
|
+
GrowsurfRuby::Models::Campaign::ParticipantCreateMobileTokenResponse
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
def create_mobile_token(
|
|
129
|
+
# GrowSurf participant ID or URL-encoded participant email address.
|
|
130
|
+
participant_id_or_email,
|
|
131
|
+
# GrowSurf program ID.
|
|
132
|
+
id:,
|
|
133
|
+
request_options: {}
|
|
134
|
+
)
|
|
135
|
+
end
|
|
136
|
+
|
|
117
137
|
# Retrieves a paged list of commissions earned by a participant.
|
|
118
138
|
sig do
|
|
119
139
|
params(
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type participant_create_mobile_token_params =
|
|
5
|
+
{ id: String, participant_id_or_email: String }
|
|
6
|
+
& GrowsurfRuby::Internal::Type::request_parameters
|
|
7
|
+
|
|
8
|
+
class ParticipantCreateMobileTokenParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
9
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
attr_accessor id: String
|
|
13
|
+
|
|
14
|
+
attr_accessor participant_id_or_email: String
|
|
15
|
+
|
|
16
|
+
def initialize: (
|
|
17
|
+
id: String,
|
|
18
|
+
participant_id_or_email: String,
|
|
19
|
+
?request_options: GrowsurfRuby::request_opts
|
|
20
|
+
) -> void
|
|
21
|
+
|
|
22
|
+
def to_hash: -> {
|
|
23
|
+
id: String,
|
|
24
|
+
participant_id_or_email: String,
|
|
25
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type participant_create_mobile_token_response =
|
|
5
|
+
{ expires_in: Integer, participant_token: String }
|
|
6
|
+
|
|
7
|
+
class ParticipantCreateMobileTokenResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
attr_accessor expires_in: Integer
|
|
9
|
+
|
|
10
|
+
attr_accessor participant_token: String
|
|
11
|
+
|
|
12
|
+
def initialize: (expires_in: Integer, participant_token: String) -> void
|
|
13
|
+
|
|
14
|
+
def to_hash: -> { expires_in: Integer, participant_token: String }
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -41,6 +41,12 @@ module GrowsurfRuby
|
|
|
41
41
|
?request_options: GrowsurfRuby::request_opts
|
|
42
42
|
) -> GrowsurfRuby::Campaign::CampaignParticipant
|
|
43
43
|
|
|
44
|
+
def create_mobile_token: (
|
|
45
|
+
String participant_id_or_email,
|
|
46
|
+
id: String,
|
|
47
|
+
?request_options: GrowsurfRuby::request_opts
|
|
48
|
+
) -> GrowsurfRuby::Models::Campaign::ParticipantCreateMobileTokenResponse
|
|
49
|
+
|
|
44
50
|
def list_commissions: (
|
|
45
51
|
String participant_id_or_email,
|
|
46
52
|
id: String,
|
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: 0.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Growsurf
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -77,6 +77,8 @@ files:
|
|
|
77
77
|
- lib/growsurf_ruby/models/campaign/fraud_risk_level.rb
|
|
78
78
|
- lib/growsurf_ruby/models/campaign/participant.rb
|
|
79
79
|
- lib/growsurf_ruby/models/campaign/participant_add_params.rb
|
|
80
|
+
- lib/growsurf_ruby/models/campaign/participant_create_mobile_token_params.rb
|
|
81
|
+
- lib/growsurf_ruby/models/campaign/participant_create_mobile_token_response.rb
|
|
80
82
|
- lib/growsurf_ruby/models/campaign/participant_delete_params.rb
|
|
81
83
|
- lib/growsurf_ruby/models/campaign/participant_delete_response.rb
|
|
82
84
|
- lib/growsurf_ruby/models/campaign/participant_list_commissions_params.rb
|
|
@@ -150,6 +152,8 @@ files:
|
|
|
150
152
|
- rbi/growsurf_ruby/models/campaign/fraud_risk_level.rbi
|
|
151
153
|
- rbi/growsurf_ruby/models/campaign/participant.rbi
|
|
152
154
|
- rbi/growsurf_ruby/models/campaign/participant_add_params.rbi
|
|
155
|
+
- rbi/growsurf_ruby/models/campaign/participant_create_mobile_token_params.rbi
|
|
156
|
+
- rbi/growsurf_ruby/models/campaign/participant_create_mobile_token_response.rbi
|
|
153
157
|
- rbi/growsurf_ruby/models/campaign/participant_delete_params.rbi
|
|
154
158
|
- rbi/growsurf_ruby/models/campaign/participant_delete_response.rbi
|
|
155
159
|
- rbi/growsurf_ruby/models/campaign/participant_list_commissions_params.rbi
|
|
@@ -222,6 +226,8 @@ files:
|
|
|
222
226
|
- sig/growsurf_ruby/models/campaign/fraud_risk_level.rbs
|
|
223
227
|
- sig/growsurf_ruby/models/campaign/participant.rbs
|
|
224
228
|
- sig/growsurf_ruby/models/campaign/participant_add_params.rbs
|
|
229
|
+
- sig/growsurf_ruby/models/campaign/participant_create_mobile_token_params.rbs
|
|
230
|
+
- sig/growsurf_ruby/models/campaign/participant_create_mobile_token_response.rbs
|
|
225
231
|
- sig/growsurf_ruby/models/campaign/participant_delete_params.rbs
|
|
226
232
|
- sig/growsurf_ruby/models/campaign/participant_delete_response.rbs
|
|
227
233
|
- sig/growsurf_ruby/models/campaign/participant_list_commissions_params.rbs
|