growsurf-ruby 0.2.0 → 0.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +9 -9
- data/lib/growsurf_ruby/models/campaign/create.rb +81 -0
- data/lib/growsurf_ruby/models/campaign/participant_add_params.rb +2 -73
- data/lib/growsurf_ruby/models/campaign_create_mobile_participant_token_params.rb +20 -0
- data/lib/growsurf_ruby/models/campaign_create_mobile_participant_token_response.rb +45 -0
- data/lib/growsurf_ruby/models.rb +3 -0
- data/lib/growsurf_ruby/resources/campaign/participant.rb +1 -29
- data/lib/growsurf_ruby/resources/campaign.rb +41 -0
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +3 -2
- data/rbi/growsurf_ruby/models/campaign/create.rbi +149 -0
- data/rbi/growsurf_ruby/models/campaign/participant_add_params.rbi +3 -129
- data/rbi/growsurf_ruby/models/campaign_create_mobile_participant_token_params.rbi +38 -0
- data/rbi/growsurf_ruby/models/campaign_create_mobile_participant_token_response.rbi +71 -0
- data/rbi/growsurf_ruby/models.rbi +3 -0
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +1 -21
- data/rbi/growsurf_ruby/resources/campaign.rbi +38 -0
- data/sig/growsurf_ruby/models/campaign/create.rbs +84 -0
- data/sig/growsurf_ruby/models/campaign/participant_add_params.rbs +4 -72
- data/sig/growsurf_ruby/models/campaign_create_mobile_participant_token_params.rbs +25 -0
- data/sig/growsurf_ruby/models/campaign_create_mobile_participant_token_response.rbs +35 -0
- data/sig/growsurf_ruby/models.rbs +2 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +1 -7
- data/sig/growsurf_ruby/resources/campaign.rbs +13 -0
- metadata +11 -8
- data/lib/growsurf_ruby/models/campaign/participant_create_mobile_token_params.rb +0 -28
- data/lib/growsurf_ruby/models/campaign/participant_create_mobile_token_response.rb +0 -27
- data/rbi/growsurf_ruby/models/campaign/participant_create_mobile_token_params.rbi +0 -48
- data/rbi/growsurf_ruby/models/campaign/participant_create_mobile_token_response.rbi +0 -44
- data/sig/growsurf_ruby/models/campaign/participant_create_mobile_token_params.rbs +0 -30
- data/sig/growsurf_ruby/models/campaign/participant_create_mobile_token_response.rbs +0 -18
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
4
|
module Models
|
|
5
5
|
module Campaign
|
|
6
|
-
class ParticipantAddParams < GrowsurfRuby::
|
|
6
|
+
class ParticipantAddParams < GrowsurfRuby::Models::Campaign::Create
|
|
7
7
|
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -18,148 +18,22 @@ module GrowsurfRuby
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
|
-
sig { returns(String) }
|
|
22
|
-
attr_accessor :email
|
|
23
|
-
|
|
24
|
-
sig { returns(T.nilable(String)) }
|
|
25
|
-
attr_reader :fingerprint
|
|
26
|
-
|
|
27
|
-
sig { params(fingerprint: String).void }
|
|
28
|
-
attr_writer :fingerprint
|
|
29
|
-
|
|
30
|
-
sig { returns(T.nilable(String)) }
|
|
31
|
-
attr_reader :first_name
|
|
32
|
-
|
|
33
|
-
sig { params(first_name: String).void }
|
|
34
|
-
attr_writer :first_name
|
|
35
|
-
|
|
36
|
-
sig { returns(T.nilable(String)) }
|
|
37
|
-
attr_reader :ip_address
|
|
38
|
-
|
|
39
|
-
sig { params(ip_address: String).void }
|
|
40
|
-
attr_writer :ip_address
|
|
41
|
-
|
|
42
|
-
sig { returns(T.nilable(String)) }
|
|
43
|
-
attr_reader :last_name
|
|
44
|
-
|
|
45
|
-
sig { params(last_name: String).void }
|
|
46
|
-
attr_writer :last_name
|
|
47
|
-
|
|
48
|
-
# Shallow custom metadata object.
|
|
49
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
50
|
-
attr_reader :metadata
|
|
51
|
-
|
|
52
|
-
sig { params(metadata: T::Hash[Symbol, T.anything]).void }
|
|
53
|
-
attr_writer :metadata
|
|
54
|
-
|
|
55
|
-
sig do
|
|
56
|
-
returns(
|
|
57
|
-
T.nilable(
|
|
58
|
-
GrowsurfRuby::Campaign::ParticipantAddParams::ReferralStatus::OrSymbol
|
|
59
|
-
)
|
|
60
|
-
)
|
|
61
|
-
end
|
|
62
|
-
attr_reader :referral_status
|
|
63
|
-
|
|
64
|
-
sig do
|
|
65
|
-
params(
|
|
66
|
-
referral_status:
|
|
67
|
-
GrowsurfRuby::Campaign::ParticipantAddParams::ReferralStatus::OrSymbol
|
|
68
|
-
).void
|
|
69
|
-
end
|
|
70
|
-
attr_writer :referral_status
|
|
71
|
-
|
|
72
|
-
# Referrer participant ID or email address.
|
|
73
|
-
sig { returns(T.nilable(String)) }
|
|
74
|
-
attr_reader :referred_by
|
|
75
|
-
|
|
76
|
-
sig { params(referred_by: String).void }
|
|
77
|
-
attr_writer :referred_by
|
|
78
|
-
|
|
79
21
|
sig do
|
|
80
22
|
params(
|
|
81
23
|
id: String,
|
|
82
|
-
email: String,
|
|
83
|
-
fingerprint: String,
|
|
84
|
-
first_name: String,
|
|
85
|
-
ip_address: String,
|
|
86
|
-
last_name: String,
|
|
87
|
-
metadata: T::Hash[Symbol, T.anything],
|
|
88
|
-
referral_status:
|
|
89
|
-
GrowsurfRuby::Campaign::ParticipantAddParams::ReferralStatus::OrSymbol,
|
|
90
|
-
referred_by: String,
|
|
91
24
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
92
25
|
).returns(T.attached_class)
|
|
93
26
|
end
|
|
94
|
-
def self.new(
|
|
95
|
-
id:,
|
|
96
|
-
email:,
|
|
97
|
-
fingerprint: nil,
|
|
98
|
-
first_name: nil,
|
|
99
|
-
ip_address: nil,
|
|
100
|
-
last_name: nil,
|
|
101
|
-
# Shallow custom metadata object.
|
|
102
|
-
metadata: nil,
|
|
103
|
-
referral_status: nil,
|
|
104
|
-
# Referrer participant ID or email address.
|
|
105
|
-
referred_by: nil,
|
|
106
|
-
request_options: {}
|
|
107
|
-
)
|
|
27
|
+
def self.new(id:, request_options: {})
|
|
108
28
|
end
|
|
109
29
|
|
|
110
30
|
sig do
|
|
111
31
|
override.returns(
|
|
112
|
-
{
|
|
113
|
-
id: String,
|
|
114
|
-
email: String,
|
|
115
|
-
fingerprint: String,
|
|
116
|
-
first_name: String,
|
|
117
|
-
ip_address: String,
|
|
118
|
-
last_name: String,
|
|
119
|
-
metadata: T::Hash[Symbol, T.anything],
|
|
120
|
-
referral_status:
|
|
121
|
-
GrowsurfRuby::Campaign::ParticipantAddParams::ReferralStatus::OrSymbol,
|
|
122
|
-
referred_by: String,
|
|
123
|
-
request_options: GrowsurfRuby::RequestOptions
|
|
124
|
-
}
|
|
32
|
+
{ id: String, request_options: GrowsurfRuby::RequestOptions }
|
|
125
33
|
)
|
|
126
34
|
end
|
|
127
35
|
def to_hash
|
|
128
36
|
end
|
|
129
|
-
|
|
130
|
-
module ReferralStatus
|
|
131
|
-
extend GrowsurfRuby::Internal::Type::Enum
|
|
132
|
-
|
|
133
|
-
TaggedSymbol =
|
|
134
|
-
T.type_alias do
|
|
135
|
-
T.all(
|
|
136
|
-
Symbol,
|
|
137
|
-
GrowsurfRuby::Campaign::ParticipantAddParams::ReferralStatus
|
|
138
|
-
)
|
|
139
|
-
end
|
|
140
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
141
|
-
|
|
142
|
-
CREDIT_PENDING =
|
|
143
|
-
T.let(
|
|
144
|
-
:CREDIT_PENDING,
|
|
145
|
-
GrowsurfRuby::Campaign::ParticipantAddParams::ReferralStatus::TaggedSymbol
|
|
146
|
-
)
|
|
147
|
-
CREDIT_AWARDED =
|
|
148
|
-
T.let(
|
|
149
|
-
:CREDIT_AWARDED,
|
|
150
|
-
GrowsurfRuby::Campaign::ParticipantAddParams::ReferralStatus::TaggedSymbol
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
sig do
|
|
154
|
-
override.returns(
|
|
155
|
-
T::Array[
|
|
156
|
-
GrowsurfRuby::Campaign::ParticipantAddParams::ReferralStatus::TaggedSymbol
|
|
157
|
-
]
|
|
158
|
-
)
|
|
159
|
-
end
|
|
160
|
-
def self.values
|
|
161
|
-
end
|
|
162
|
-
end
|
|
163
37
|
end
|
|
164
38
|
end
|
|
165
39
|
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class CampaignCreateMobileParticipantTokenParams < GrowsurfRuby::Models::Campaign::Create
|
|
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::CampaignCreateMobileParticipantTokenParams,
|
|
13
|
+
GrowsurfRuby::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: GrowsurfRuby::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class CampaignCreateMobileParticipantTokenResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenResponse,
|
|
10
|
+
GrowsurfRuby::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Token lifetime in seconds.
|
|
15
|
+
sig { returns(Integer) }
|
|
16
|
+
attr_accessor :expires_in
|
|
17
|
+
|
|
18
|
+
# Whether this request created a new participant. Returns false when the
|
|
19
|
+
# participant already existed.
|
|
20
|
+
sig { returns(T::Boolean) }
|
|
21
|
+
attr_accessor :is_new
|
|
22
|
+
|
|
23
|
+
sig { returns(GrowsurfRuby::Campaign::CampaignParticipant) }
|
|
24
|
+
attr_reader :participant
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
participant: GrowsurfRuby::Campaign::CampaignParticipant::OrHash
|
|
29
|
+
).void
|
|
30
|
+
end
|
|
31
|
+
attr_writer :participant
|
|
32
|
+
|
|
33
|
+
# Participant-scoped bearer token for GrowSurf mobile SDK participant endpoints.
|
|
34
|
+
sig { returns(String) }
|
|
35
|
+
attr_accessor :participant_token
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
params(
|
|
39
|
+
expires_in: Integer,
|
|
40
|
+
is_new: T::Boolean,
|
|
41
|
+
participant: GrowsurfRuby::Campaign::CampaignParticipant::OrHash,
|
|
42
|
+
participant_token: String
|
|
43
|
+
).returns(T.attached_class)
|
|
44
|
+
end
|
|
45
|
+
def self.new(
|
|
46
|
+
# Token lifetime in seconds.
|
|
47
|
+
expires_in:,
|
|
48
|
+
# Whether this request created a new participant. Returns false when the
|
|
49
|
+
# participant already existed.
|
|
50
|
+
is_new:,
|
|
51
|
+
participant:,
|
|
52
|
+
# Participant-scoped bearer token for GrowSurf mobile SDK participant endpoints.
|
|
53
|
+
participant_token:
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
override.returns(
|
|
59
|
+
{
|
|
60
|
+
expires_in: Integer,
|
|
61
|
+
is_new: T::Boolean,
|
|
62
|
+
participant: GrowsurfRuby::Campaign::CampaignParticipant,
|
|
63
|
+
participant_token: String
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
def to_hash
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -5,6 +5,9 @@ module GrowsurfRuby
|
|
|
5
5
|
|
|
6
6
|
CampaignAPI = GrowsurfRuby::Models::CampaignAPI
|
|
7
7
|
|
|
8
|
+
CampaignCreateMobileParticipantTokenParams =
|
|
9
|
+
GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenParams
|
|
10
|
+
|
|
8
11
|
CampaignListCommissionsParams =
|
|
9
12
|
GrowsurfRuby::Models::CampaignListCommissionsParams
|
|
10
13
|
|
|
@@ -92,7 +92,7 @@ module GrowsurfRuby
|
|
|
92
92
|
last_name: String,
|
|
93
93
|
metadata: T::Hash[Symbol, T.anything],
|
|
94
94
|
referral_status:
|
|
95
|
-
GrowsurfRuby::Campaign::
|
|
95
|
+
GrowsurfRuby::Campaign::Create::ReferralStatus::OrSymbol,
|
|
96
96
|
referred_by: String,
|
|
97
97
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
98
98
|
).returns(GrowsurfRuby::Campaign::CampaignParticipant)
|
|
@@ -114,26 +114,6 @@ 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
|
-
|
|
137
117
|
# Retrieves a paged list of commissions earned by a participant.
|
|
138
118
|
sig do
|
|
139
119
|
params(
|
|
@@ -37,6 +37,44 @@ module GrowsurfRuby
|
|
|
37
37
|
def list(request_options: {})
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
# Creates or returns a participant using the same input behavior as Add
|
|
41
|
+
# Participant, then returns a participant-scoped token for GrowSurf mobile SDK
|
|
42
|
+
# participant endpoints. Use this endpoint from your backend after your mobile app
|
|
43
|
+
# authenticates a signed-in user. The program must have mobile SDK access enabled.
|
|
44
|
+
sig do
|
|
45
|
+
params(
|
|
46
|
+
id: String,
|
|
47
|
+
email: String,
|
|
48
|
+
fingerprint: String,
|
|
49
|
+
first_name: String,
|
|
50
|
+
ip_address: String,
|
|
51
|
+
last_name: String,
|
|
52
|
+
metadata: T::Hash[Symbol, T.anything],
|
|
53
|
+
referral_status:
|
|
54
|
+
GrowsurfRuby::Campaign::Create::ReferralStatus::OrSymbol,
|
|
55
|
+
referred_by: String,
|
|
56
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
57
|
+
).returns(
|
|
58
|
+
GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenResponse
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
def create_mobile_participant_token(
|
|
62
|
+
# GrowSurf program ID.
|
|
63
|
+
id,
|
|
64
|
+
email:,
|
|
65
|
+
fingerprint: nil,
|
|
66
|
+
first_name: nil,
|
|
67
|
+
ip_address: nil,
|
|
68
|
+
last_name: nil,
|
|
69
|
+
# Shallow custom metadata object.
|
|
70
|
+
metadata: nil,
|
|
71
|
+
referral_status: nil,
|
|
72
|
+
# Referrer participant ID or email address.
|
|
73
|
+
referred_by: nil,
|
|
74
|
+
request_options: {}
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
40
78
|
# Retrieves a paged list of all participant commissions in an affiliate program.
|
|
41
79
|
sig do
|
|
42
80
|
params(
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type create =
|
|
5
|
+
{
|
|
6
|
+
email: String,
|
|
7
|
+
fingerprint: String,
|
|
8
|
+
first_name: String,
|
|
9
|
+
ip_address: String,
|
|
10
|
+
last_name: String,
|
|
11
|
+
metadata: ::Hash[Symbol, top],
|
|
12
|
+
referral_status: GrowsurfRuby::Models::Campaign::Create::referral_status,
|
|
13
|
+
referred_by: String
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class Create < GrowsurfRuby::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor email: String
|
|
18
|
+
|
|
19
|
+
attr_reader fingerprint: String?
|
|
20
|
+
|
|
21
|
+
def fingerprint=: (String) -> String
|
|
22
|
+
|
|
23
|
+
attr_reader first_name: String?
|
|
24
|
+
|
|
25
|
+
def first_name=: (String) -> String
|
|
26
|
+
|
|
27
|
+
attr_reader ip_address: String?
|
|
28
|
+
|
|
29
|
+
def ip_address=: (String) -> String
|
|
30
|
+
|
|
31
|
+
attr_reader last_name: String?
|
|
32
|
+
|
|
33
|
+
def last_name=: (String) -> String
|
|
34
|
+
|
|
35
|
+
attr_reader metadata: ::Hash[Symbol, top]?
|
|
36
|
+
|
|
37
|
+
def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
38
|
+
|
|
39
|
+
attr_reader referral_status: GrowsurfRuby::Models::Campaign::Create::referral_status?
|
|
40
|
+
|
|
41
|
+
def referral_status=: (
|
|
42
|
+
GrowsurfRuby::Models::Campaign::Create::referral_status
|
|
43
|
+
) -> GrowsurfRuby::Models::Campaign::Create::referral_status
|
|
44
|
+
|
|
45
|
+
attr_reader referred_by: String?
|
|
46
|
+
|
|
47
|
+
def referred_by=: (String) -> String
|
|
48
|
+
|
|
49
|
+
def initialize: (
|
|
50
|
+
email: String,
|
|
51
|
+
?fingerprint: String,
|
|
52
|
+
?first_name: String,
|
|
53
|
+
?ip_address: String,
|
|
54
|
+
?last_name: String,
|
|
55
|
+
?metadata: ::Hash[Symbol, top],
|
|
56
|
+
?referral_status: GrowsurfRuby::Models::Campaign::Create::referral_status,
|
|
57
|
+
?referred_by: String
|
|
58
|
+
) -> void
|
|
59
|
+
|
|
60
|
+
def to_hash: -> {
|
|
61
|
+
email: String,
|
|
62
|
+
fingerprint: String,
|
|
63
|
+
first_name: String,
|
|
64
|
+
ip_address: String,
|
|
65
|
+
last_name: String,
|
|
66
|
+
metadata: ::Hash[Symbol, top],
|
|
67
|
+
referral_status: GrowsurfRuby::Models::Campaign::Create::referral_status,
|
|
68
|
+
referred_by: String
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type referral_status = :CREDIT_PENDING | :CREDIT_AWARDED
|
|
72
|
+
|
|
73
|
+
module ReferralStatus
|
|
74
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
75
|
+
|
|
76
|
+
CREDIT_PENDING: :CREDIT_PENDING
|
|
77
|
+
CREDIT_AWARDED: :CREDIT_AWARDED
|
|
78
|
+
|
|
79
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::Create::referral_status]
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -2,93 +2,25 @@ module GrowsurfRuby
|
|
|
2
2
|
module Models
|
|
3
3
|
module Campaign
|
|
4
4
|
type participant_add_params =
|
|
5
|
-
{
|
|
6
|
-
id: String,
|
|
7
|
-
email: String,
|
|
8
|
-
fingerprint: String,
|
|
9
|
-
first_name: String,
|
|
10
|
-
ip_address: String,
|
|
11
|
-
last_name: String,
|
|
12
|
-
metadata: ::Hash[Symbol, top],
|
|
13
|
-
referral_status: GrowsurfRuby::Models::Campaign::ParticipantAddParams::referral_status,
|
|
14
|
-
referred_by: String
|
|
15
|
-
}
|
|
16
|
-
& GrowsurfRuby::Internal::Type::request_parameters
|
|
5
|
+
{ id: String } & GrowsurfRuby::Internal::Type::request_parameters
|
|
17
6
|
|
|
18
|
-
class ParticipantAddParams < GrowsurfRuby::
|
|
7
|
+
class ParticipantAddParams < GrowsurfRuby::Models::Campaign::Create
|
|
19
8
|
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
20
9
|
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
21
10
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
attr_accessor email: String
|
|
25
|
-
|
|
26
|
-
attr_reader fingerprint: String?
|
|
27
|
-
|
|
28
|
-
def fingerprint=: (String) -> String
|
|
29
|
-
|
|
30
|
-
attr_reader first_name: String?
|
|
31
|
-
|
|
32
|
-
def first_name=: (String) -> String
|
|
33
|
-
|
|
34
|
-
attr_reader ip_address: String?
|
|
35
|
-
|
|
36
|
-
def ip_address=: (String) -> String
|
|
37
|
-
|
|
38
|
-
attr_reader last_name: String?
|
|
11
|
+
def id: -> String
|
|
39
12
|
|
|
40
|
-
def
|
|
41
|
-
|
|
42
|
-
attr_reader metadata: ::Hash[Symbol, top]?
|
|
43
|
-
|
|
44
|
-
def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
45
|
-
|
|
46
|
-
attr_reader referral_status: GrowsurfRuby::Models::Campaign::ParticipantAddParams::referral_status?
|
|
47
|
-
|
|
48
|
-
def referral_status=: (
|
|
49
|
-
GrowsurfRuby::Models::Campaign::ParticipantAddParams::referral_status
|
|
50
|
-
) -> GrowsurfRuby::Models::Campaign::ParticipantAddParams::referral_status
|
|
51
|
-
|
|
52
|
-
attr_reader referred_by: String?
|
|
53
|
-
|
|
54
|
-
def referred_by=: (String) -> String
|
|
13
|
+
def id=: (String _) -> String
|
|
55
14
|
|
|
56
15
|
def initialize: (
|
|
57
16
|
id: String,
|
|
58
|
-
email: String,
|
|
59
|
-
?fingerprint: String,
|
|
60
|
-
?first_name: String,
|
|
61
|
-
?ip_address: String,
|
|
62
|
-
?last_name: String,
|
|
63
|
-
?metadata: ::Hash[Symbol, top],
|
|
64
|
-
?referral_status: GrowsurfRuby::Models::Campaign::ParticipantAddParams::referral_status,
|
|
65
|
-
?referred_by: String,
|
|
66
17
|
?request_options: GrowsurfRuby::request_opts
|
|
67
18
|
) -> void
|
|
68
19
|
|
|
69
20
|
def to_hash: -> {
|
|
70
21
|
id: String,
|
|
71
|
-
email: String,
|
|
72
|
-
fingerprint: String,
|
|
73
|
-
first_name: String,
|
|
74
|
-
ip_address: String,
|
|
75
|
-
last_name: String,
|
|
76
|
-
metadata: ::Hash[Symbol, top],
|
|
77
|
-
referral_status: GrowsurfRuby::Models::Campaign::ParticipantAddParams::referral_status,
|
|
78
|
-
referred_by: String,
|
|
79
22
|
request_options: GrowsurfRuby::RequestOptions
|
|
80
23
|
}
|
|
81
|
-
|
|
82
|
-
type referral_status = :CREDIT_PENDING | :CREDIT_AWARDED
|
|
83
|
-
|
|
84
|
-
module ReferralStatus
|
|
85
|
-
extend GrowsurfRuby::Internal::Type::Enum
|
|
86
|
-
|
|
87
|
-
CREDIT_PENDING: :CREDIT_PENDING
|
|
88
|
-
CREDIT_AWARDED: :CREDIT_AWARDED
|
|
89
|
-
|
|
90
|
-
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::ParticipantAddParams::referral_status]
|
|
91
|
-
end
|
|
92
24
|
end
|
|
93
25
|
end
|
|
94
26
|
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type campaign_create_mobile_participant_token_params =
|
|
4
|
+
{ id: String } & GrowsurfRuby::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class CampaignCreateMobileParticipantTokenParams < GrowsurfRuby::Models::Campaign::Create
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
def id: -> String
|
|
11
|
+
|
|
12
|
+
def id=: (String _) -> String
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
id: String,
|
|
16
|
+
?request_options: GrowsurfRuby::request_opts
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
id: String,
|
|
21
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type campaign_create_mobile_participant_token_response =
|
|
4
|
+
{
|
|
5
|
+
expires_in: Integer,
|
|
6
|
+
is_new: bool,
|
|
7
|
+
participant: GrowsurfRuby::Campaign::CampaignParticipant,
|
|
8
|
+
participant_token: String
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class CampaignCreateMobileParticipantTokenResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor expires_in: Integer
|
|
13
|
+
|
|
14
|
+
attr_accessor is_new: bool
|
|
15
|
+
|
|
16
|
+
attr_accessor participant: GrowsurfRuby::Campaign::CampaignParticipant
|
|
17
|
+
|
|
18
|
+
attr_accessor participant_token: String
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
expires_in: Integer,
|
|
22
|
+
is_new: bool,
|
|
23
|
+
participant: GrowsurfRuby::Campaign::CampaignParticipant,
|
|
24
|
+
participant_token: String
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> {
|
|
28
|
+
expires_in: Integer,
|
|
29
|
+
is_new: bool,
|
|
30
|
+
participant: GrowsurfRuby::Campaign::CampaignParticipant,
|
|
31
|
+
participant_token: String
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -3,6 +3,8 @@ module GrowsurfRuby
|
|
|
3
3
|
|
|
4
4
|
class CampaignAPI = GrowsurfRuby::Models::CampaignAPI
|
|
5
5
|
|
|
6
|
+
class CampaignCreateMobileParticipantTokenParams = GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenParams
|
|
7
|
+
|
|
6
8
|
class CampaignListCommissionsParams = GrowsurfRuby::Models::CampaignListCommissionsParams
|
|
7
9
|
|
|
8
10
|
class CampaignListLeaderboardParams = GrowsurfRuby::Models::CampaignListLeaderboardParams
|
|
@@ -36,17 +36,11 @@ module GrowsurfRuby
|
|
|
36
36
|
?ip_address: String,
|
|
37
37
|
?last_name: String,
|
|
38
38
|
?metadata: ::Hash[Symbol, top],
|
|
39
|
-
?referral_status: GrowsurfRuby::Models::Campaign::
|
|
39
|
+
?referral_status: GrowsurfRuby::Models::Campaign::Create::referral_status,
|
|
40
40
|
?referred_by: String,
|
|
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
|
-
|
|
50
44
|
def list_commissions: (
|
|
51
45
|
String participant_id_or_email,
|
|
52
46
|
id: String,
|
|
@@ -16,6 +16,19 @@ module GrowsurfRuby
|
|
|
16
16
|
?request_options: GrowsurfRuby::request_opts
|
|
17
17
|
) -> GrowsurfRuby::Models::CampaignListResponse
|
|
18
18
|
|
|
19
|
+
def create_mobile_participant_token: (
|
|
20
|
+
String id,
|
|
21
|
+
email: String,
|
|
22
|
+
?fingerprint: String,
|
|
23
|
+
?first_name: String,
|
|
24
|
+
?ip_address: String,
|
|
25
|
+
?last_name: String,
|
|
26
|
+
?metadata: ::Hash[Symbol, top],
|
|
27
|
+
?referral_status: GrowsurfRuby::Models::Campaign::Create::referral_status,
|
|
28
|
+
?referred_by: String,
|
|
29
|
+
?request_options: GrowsurfRuby::request_opts
|
|
30
|
+
) -> GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenResponse
|
|
31
|
+
|
|
19
32
|
def list_commissions: (
|
|
20
33
|
String id,
|
|
21
34
|
?limit: Integer,
|