growsurf-ruby 1.2.1 → 1.4.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 +21 -0
- data/LICENSE +201 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/internal/transport/base_client.rb +21 -4
- data/lib/growsurf_ruby/models/affiliate_application.rb +249 -0
- data/lib/growsurf_ruby/models/affiliate_application_list_response.rb +42 -0
- data/lib/growsurf_ruby/models/affiliate_invite.rb +109 -0
- data/lib/growsurf_ruby/models/affiliate_invite_list_response.rb +41 -0
- data/lib/growsurf_ruby/models/campaign/create.rb +12 -1
- data/lib/growsurf_ruby/models/campaign/participant.rb +79 -4
- data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +28 -17
- data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rb +28 -0
- data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rb +126 -0
- data/lib/growsurf_ruby/models/campaign/participant_list_payouts_params.rb +1 -0
- data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rb +50 -0
- data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rb +56 -0
- data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +25 -25
- data/lib/growsurf_ruby/models/campaign/participant_reward.rb +1 -0
- data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +25 -9
- data/lib/growsurf_ruby/models/campaign/referral_source.rb +3 -0
- data/lib/growsurf_ruby/models/campaign/reward.rb +41 -3
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +26 -4
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +26 -4
- data/lib/growsurf_ruby/models/campaign.rb +24 -3
- data/lib/growsurf_ruby/models/campaign_create_affiliate_invite_params.rb +45 -0
- data/lib/growsurf_ruby/models/campaign_list_affiliate_applications_params.rb +57 -0
- data/lib/growsurf_ruby/models/campaign_list_affiliate_invites_params.rb +58 -0
- data/lib/growsurf_ruby/models/campaign_list_payouts_params.rb +1 -0
- data/lib/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rb +26 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rb +26 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +9 -6
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +59 -11
- data/lib/growsurf_ruby/models/campaign_review_affiliate_application_params.rb +94 -0
- data/lib/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rb +26 -0
- data/lib/growsurf_ruby/models/commission_structure.rb +16 -3
- data/lib/growsurf_ruby/models/email_analytics.rb +41 -0
- data/lib/growsurf_ruby/models/participant_commission_list.rb +19 -1
- data/lib/growsurf_ruby/models/participant_payout_list.rb +8 -1
- data/lib/growsurf_ruby/models/reward_tax_valuation.rb +24 -9
- data/lib/growsurf_ruby/models.rb +19 -0
- data/lib/growsurf_ruby/resources/campaign/design.rb +14 -12
- data/lib/growsurf_ruby/resources/campaign/options.rb +7 -7
- data/lib/growsurf_ruby/resources/campaign/participant.rb +101 -14
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +8 -4
- data/lib/growsurf_ruby/resources/campaign.rb +231 -4
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +16 -0
- data/rbi/growsurf_ruby/models/affiliate_application.rbi +431 -0
- data/rbi/growsurf_ruby/models/affiliate_application_list_response.rbi +70 -0
- data/rbi/growsurf_ruby/models/affiliate_invite.rbi +167 -0
- data/rbi/growsurf_ruby/models/affiliate_invite_list_response.rbi +70 -0
- data/rbi/growsurf_ruby/models/campaign/create.rbi +17 -0
- data/rbi/growsurf_ruby/models/campaign/participant.rbi +169 -3
- data/rbi/growsurf_ruby/models/campaign/participant_activity_logs_response.rbi +3 -5
- data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +35 -20
- data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbi +3 -1
- data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rbi +48 -0
- data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbi +243 -0
- data/rbi/growsurf_ruby/models/campaign/participant_list_payouts_params.rbi +5 -0
- data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbi +100 -0
- data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbi +118 -0
- data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +38 -62
- data/rbi/growsurf_ruby/models/campaign/participant_reward.rbi +5 -0
- data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +67 -11
- data/rbi/growsurf_ruby/models/campaign/referral_source.rbi +9 -0
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +78 -2
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +68 -4
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +68 -4
- data/rbi/growsurf_ruby/models/campaign.rbi +48 -2
- data/rbi/growsurf_ruby/models/campaign_create_affiliate_invite_params.rbi +74 -0
- data/rbi/growsurf_ruby/models/campaign_list_affiliate_applications_params.rbi +130 -0
- data/rbi/growsurf_ruby/models/campaign_list_affiliate_invites_params.rbi +135 -0
- data/rbi/growsurf_ruby/models/campaign_list_payouts_params.rbi +5 -0
- data/rbi/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rbi +46 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rbi +46 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +15 -10
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +68 -18
- data/rbi/growsurf_ruby/models/campaign_review_affiliate_application_params.rbi +167 -0
- data/rbi/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rbi +46 -0
- data/rbi/growsurf_ruby/models/commission_structure.rbi +34 -3
- data/rbi/growsurf_ruby/models/email_analytics.rbi +200 -0
- data/rbi/growsurf_ruby/models/participant_commission_list.rbi +48 -0
- data/rbi/growsurf_ruby/models/participant_payout_list.rbi +17 -3
- data/rbi/growsurf_ruby/models/reward_tax_valuation.rbi +66 -9
- data/rbi/growsurf_ruby/models.rbi +25 -0
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +9 -8
- data/rbi/growsurf_ruby/resources/campaign/options.rbi +7 -7
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +99 -18
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +18 -4
- data/rbi/growsurf_ruby/resources/campaign.rbi +188 -10
- data/sig/growsurf_ruby/models/affiliate_application.rbs +192 -0
- data/sig/growsurf_ruby/models/affiliate_application_list_response.rbs +39 -0
- data/sig/growsurf_ruby/models/affiliate_invite.rbs +92 -0
- data/sig/growsurf_ruby/models/affiliate_invite_list_response.rbs +39 -0
- data/sig/growsurf_ruby/models/campaign/create.rbs +7 -0
- data/sig/growsurf_ruby/models/campaign/participant.rbs +62 -2
- data/sig/growsurf_ruby/models/campaign/participant_activity_logs_response.rbs +2 -11
- data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +12 -12
- data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbs +107 -0
- data/sig/growsurf_ruby/models/campaign/participant_list_payouts_params.rbs +2 -1
- data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbs +49 -0
- data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbs +57 -0
- data/sig/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbs +5 -13
- data/sig/growsurf_ruby/models/campaign/participant_reward.rbs +2 -1
- data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +21 -7
- data/sig/growsurf_ruby/models/campaign/referral_source.rbs +4 -1
- data/sig/growsurf_ruby/models/campaign/reward.rbs +28 -0
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +20 -0
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +20 -0
- data/sig/growsurf_ruby/models/campaign.rbs +16 -0
- data/sig/growsurf_ruby/models/campaign_create_affiliate_invite_params.rbs +40 -0
- data/sig/growsurf_ruby/models/campaign_list_affiliate_applications_params.rbs +61 -0
- data/sig/growsurf_ruby/models/campaign_list_affiliate_invites_params.rbs +62 -0
- data/sig/growsurf_ruby/models/campaign_list_payouts_params.rbs +2 -1
- data/sig/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rbs +28 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rbs +28 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +36 -16
- data/sig/growsurf_ruby/models/campaign_review_affiliate_application_params.rbs +79 -0
- data/sig/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rbs +28 -0
- data/sig/growsurf_ruby/models/commission_structure.rbs +16 -4
- data/sig/growsurf_ruby/models/email_analytics.rbs +92 -0
- data/sig/growsurf_ruby/models/participant_commission_list.rbs +16 -0
- data/sig/growsurf_ruby/models/participant_payout_list.rbs +12 -4
- data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +26 -4
- data/sig/growsurf_ruby/models.rbs +18 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +16 -2
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +2 -0
- data/sig/growsurf_ruby/resources/campaign.rbs +53 -0
- metadata +54 -3
data/lib/growsurf_ruby.rb
CHANGED
|
@@ -63,6 +63,7 @@ require_relative "growsurf_ruby/models/campaign/delete_reward_response"
|
|
|
63
63
|
require_relative "growsurf_ruby/models/campaign/fraud_risk_level"
|
|
64
64
|
require_relative "growsurf_ruby/models/campaign/participant_activity_logs_response"
|
|
65
65
|
require_relative "growsurf_ruby/models/campaign/participant_add_params"
|
|
66
|
+
require_relative "growsurf_ruby/models/email_analytics"
|
|
66
67
|
require_relative "growsurf_ruby/models/campaign/participant_analytics_response"
|
|
67
68
|
require_relative "growsurf_ruby/models/campaign/participant_bulk_delete_params"
|
|
68
69
|
require_relative "growsurf_ruby/models/campaign/participant_bulk_delete_response"
|
|
@@ -72,6 +73,8 @@ require_relative "growsurf_ruby/models/campaign/participant_delete_params"
|
|
|
72
73
|
require_relative "growsurf_ruby/models/campaign/participant_delete_response"
|
|
73
74
|
require_relative "growsurf_ruby/models/campaign/participant_email_params"
|
|
74
75
|
require_relative "growsurf_ruby/models/campaign/participant_email_response"
|
|
76
|
+
require_relative "growsurf_ruby/models/campaign/participant_get_payout_destination_params"
|
|
77
|
+
require_relative "growsurf_ruby/models/campaign/participant_get_payout_destination_response"
|
|
75
78
|
require_relative "growsurf_ruby/models/campaign/participant_list_activity_logs_params"
|
|
76
79
|
require_relative "growsurf_ruby/models/campaign/participant_list_commissions_params"
|
|
77
80
|
require_relative "growsurf_ruby/models/campaign/participant_list_payouts_params"
|
|
@@ -82,6 +85,8 @@ require_relative "growsurf_ruby/models/campaign/participant_record_transaction_p
|
|
|
82
85
|
require_relative "growsurf_ruby/models/campaign/participant_record_transaction_response"
|
|
83
86
|
require_relative "growsurf_ruby/models/campaign/participant_refund_transaction_params"
|
|
84
87
|
require_relative "growsurf_ruby/models/campaign/participant_refund_transaction_response"
|
|
88
|
+
require_relative "growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params"
|
|
89
|
+
require_relative "growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response"
|
|
85
90
|
require_relative "growsurf_ruby/models/campaign/participant_retrieve_analytics_params"
|
|
86
91
|
require_relative "growsurf_ruby/models/campaign/participant_retrieve_params"
|
|
87
92
|
require_relative "growsurf_ruby/models/campaign/participant_reward"
|
|
@@ -112,14 +117,21 @@ require_relative "growsurf_ruby/models/campaign/webhook_test_response"
|
|
|
112
117
|
require_relative "growsurf_ruby/models/campaign/webhook_update_params"
|
|
113
118
|
require_relative "growsurf_ruby/models/account_create_params"
|
|
114
119
|
require_relative "growsurf_ruby/models/account_create_response"
|
|
120
|
+
require_relative "growsurf_ruby/models/affiliate_application"
|
|
121
|
+
require_relative "growsurf_ruby/models/affiliate_application_list_response"
|
|
122
|
+
require_relative "growsurf_ruby/models/affiliate_invite"
|
|
123
|
+
require_relative "growsurf_ruby/models/affiliate_invite_list_response"
|
|
115
124
|
require_relative "growsurf_ruby/models/team"
|
|
116
125
|
require_relative "growsurf_ruby/models/team_resend_owner_verification_email_response"
|
|
117
126
|
require_relative "growsurf_ruby/models/team_rotate_api_key_response"
|
|
118
127
|
require_relative "growsurf_ruby/models/team_update_params"
|
|
119
128
|
require_relative "growsurf_ruby/models/campaign"
|
|
129
|
+
require_relative "growsurf_ruby/models/campaign_create_affiliate_invite_params"
|
|
120
130
|
require_relative "growsurf_ruby/models/campaign_create_mobile_participant_token_params"
|
|
121
131
|
require_relative "growsurf_ruby/models/campaign_create_mobile_participant_token_response"
|
|
122
132
|
require_relative "growsurf_ruby/models/campaign_create_params"
|
|
133
|
+
require_relative "growsurf_ruby/models/campaign_list_affiliate_applications_params"
|
|
134
|
+
require_relative "growsurf_ruby/models/campaign_list_affiliate_invites_params"
|
|
123
135
|
require_relative "growsurf_ruby/models/campaign_list_commissions_params"
|
|
124
136
|
require_relative "growsurf_ruby/models/campaign_list_leaderboard_params"
|
|
125
137
|
require_relative "growsurf_ruby/models/campaign_list_params"
|
|
@@ -127,9 +139,13 @@ require_relative "growsurf_ruby/models/campaign_list_participants_params"
|
|
|
127
139
|
require_relative "growsurf_ruby/models/campaign_list_payouts_params"
|
|
128
140
|
require_relative "growsurf_ruby/models/campaign_list_referrals_params"
|
|
129
141
|
require_relative "growsurf_ruby/models/campaign_list_response"
|
|
142
|
+
require_relative "growsurf_ruby/models/campaign_resend_affiliate_invite_params"
|
|
143
|
+
require_relative "growsurf_ruby/models/campaign_retrieve_affiliate_application_params"
|
|
130
144
|
require_relative "growsurf_ruby/models/campaign_retrieve_analytics_params"
|
|
131
145
|
require_relative "growsurf_ruby/models/campaign_retrieve_analytics_response"
|
|
132
146
|
require_relative "growsurf_ruby/models/campaign_retrieve_params"
|
|
147
|
+
require_relative "growsurf_ruby/models/campaign_review_affiliate_application_params"
|
|
148
|
+
require_relative "growsurf_ruby/models/campaign_revoke_affiliate_invite_params"
|
|
133
149
|
require_relative "growsurf_ruby/models/campaign_update_params"
|
|
134
150
|
require_relative "growsurf_ruby/models/commission_structure"
|
|
135
151
|
require_relative "growsurf_ruby/models/participant_commission_list"
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class AffiliateApplication < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
GrowsurfRuby::AffiliateApplication,
|
|
10
|
+
GrowsurfRuby::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The applicant's answers to the saved application form.
|
|
15
|
+
sig do
|
|
16
|
+
returns(T::Array[GrowsurfRuby::AffiliateApplication::Answer])
|
|
17
|
+
end
|
|
18
|
+
attr_reader :answers
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
answers: T::Array[GrowsurfRuby::AffiliateApplication::Answer::OrHash]
|
|
23
|
+
).void
|
|
24
|
+
end
|
|
25
|
+
attr_writer :answers
|
|
26
|
+
|
|
27
|
+
# When the application was submitted, in Unix milliseconds.
|
|
28
|
+
sig { returns(Integer) }
|
|
29
|
+
attr_reader :created_at
|
|
30
|
+
|
|
31
|
+
sig { params(created_at: Integer).void }
|
|
32
|
+
attr_writer :created_at
|
|
33
|
+
|
|
34
|
+
# When the decision was made, in Unix milliseconds. `null` while pending.
|
|
35
|
+
sig { returns(T.nilable(Integer)) }
|
|
36
|
+
attr_accessor :decided_at
|
|
37
|
+
|
|
38
|
+
# Required applicant email address, or `null` after applicant data is removed
|
|
39
|
+
# under the Program's retention policy.
|
|
40
|
+
sig { returns(T.nilable(String)) }
|
|
41
|
+
attr_accessor :email
|
|
42
|
+
|
|
43
|
+
# Required applicant first name, or `null` after applicant data is removed under
|
|
44
|
+
# the Program's retention policy.
|
|
45
|
+
sig { returns(T.nilable(String)) }
|
|
46
|
+
attr_reader :first_name
|
|
47
|
+
|
|
48
|
+
sig { params(first_name: T.nilable(String)).void }
|
|
49
|
+
attr_writer :first_name
|
|
50
|
+
|
|
51
|
+
# Application ID.
|
|
52
|
+
sig { returns(String) }
|
|
53
|
+
attr_reader :id
|
|
54
|
+
|
|
55
|
+
sig { params(id: String).void }
|
|
56
|
+
attr_writer :id
|
|
57
|
+
|
|
58
|
+
# Required applicant last name, or `null` after applicant data is removed under
|
|
59
|
+
# the Program's retention policy.
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
attr_reader :last_name
|
|
62
|
+
|
|
63
|
+
sig { params(last_name: T.nilable(String)).void }
|
|
64
|
+
attr_writer :last_name
|
|
65
|
+
|
|
66
|
+
# ID of the participant created or upgraded by approval. `null` until the
|
|
67
|
+
# application is approved.
|
|
68
|
+
sig { returns(T.nilable(String)) }
|
|
69
|
+
attr_accessor :participant_id
|
|
70
|
+
|
|
71
|
+
# When a denied applicant may apply again, in Unix milliseconds. `null` when not
|
|
72
|
+
# applicable.
|
|
73
|
+
sig { returns(T.nilable(Integer)) }
|
|
74
|
+
attr_accessor :reapply_allowed_at
|
|
75
|
+
|
|
76
|
+
# The structured reason recorded when the application was denied. `null` until
|
|
77
|
+
# then.
|
|
78
|
+
sig { returns(T.nilable(String)) }
|
|
79
|
+
attr_accessor :rejection_reason
|
|
80
|
+
|
|
81
|
+
# When the application was reviewed, in Unix milliseconds. `null` while pending.
|
|
82
|
+
sig { returns(T.nilable(Integer)) }
|
|
83
|
+
attr_accessor :reviewed_at
|
|
84
|
+
|
|
85
|
+
# GrowSurf risk assessment. Applications that are not `LOW` risk are held for
|
|
86
|
+
# manual review; `null` means no assessment was recorded.
|
|
87
|
+
sig do
|
|
88
|
+
returns(
|
|
89
|
+
T.nilable(
|
|
90
|
+
GrowsurfRuby::AffiliateApplication::RiskLevel::TaggedSymbol
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
attr_reader :risk_level
|
|
95
|
+
|
|
96
|
+
sig do
|
|
97
|
+
params(
|
|
98
|
+
risk_level:
|
|
99
|
+
T.nilable(GrowsurfRuby::AffiliateApplication::RiskLevel::OrSymbol)
|
|
100
|
+
).void
|
|
101
|
+
end
|
|
102
|
+
attr_writer :risk_level
|
|
103
|
+
|
|
104
|
+
# Where the application is in review. Only `PENDING` applications can be decided.
|
|
105
|
+
sig do
|
|
106
|
+
returns(
|
|
107
|
+
GrowsurfRuby::AffiliateApplication::Status::TaggedSymbol
|
|
108
|
+
)
|
|
109
|
+
end
|
|
110
|
+
attr_reader :status
|
|
111
|
+
|
|
112
|
+
sig do
|
|
113
|
+
params(
|
|
114
|
+
status: GrowsurfRuby::AffiliateApplication::Status::OrSymbol
|
|
115
|
+
).void
|
|
116
|
+
end
|
|
117
|
+
attr_writer :status
|
|
118
|
+
|
|
119
|
+
# When the applicant accepted the Program Terms, in Unix milliseconds, or `null`
|
|
120
|
+
# when acceptance was not required.
|
|
121
|
+
sig { returns(T.nilable(Integer)) }
|
|
122
|
+
attr_reader :terms_accepted_at
|
|
123
|
+
|
|
124
|
+
sig { params(terms_accepted_at: T.nilable(Integer)).void }
|
|
125
|
+
attr_writer :terms_accepted_at
|
|
126
|
+
|
|
127
|
+
sig do
|
|
128
|
+
params(
|
|
129
|
+
answers: T::Array[GrowsurfRuby::AffiliateApplication::Answer::OrHash],
|
|
130
|
+
created_at: Integer,
|
|
131
|
+
decided_at: T.nilable(Integer),
|
|
132
|
+
email: T.nilable(String),
|
|
133
|
+
first_name: T.nilable(String),
|
|
134
|
+
id: String,
|
|
135
|
+
last_name: T.nilable(String),
|
|
136
|
+
participant_id: T.nilable(String),
|
|
137
|
+
reapply_allowed_at: T.nilable(Integer),
|
|
138
|
+
rejection_reason: T.nilable(String),
|
|
139
|
+
reviewed_at: T.nilable(Integer),
|
|
140
|
+
risk_level:
|
|
141
|
+
T.nilable(GrowsurfRuby::AffiliateApplication::RiskLevel::OrSymbol),
|
|
142
|
+
status: GrowsurfRuby::AffiliateApplication::Status::OrSymbol,
|
|
143
|
+
terms_accepted_at: T.nilable(Integer)
|
|
144
|
+
).returns(T.attached_class)
|
|
145
|
+
end
|
|
146
|
+
def self.new(
|
|
147
|
+
# The applicant's answers to the saved application form.
|
|
148
|
+
answers:,
|
|
149
|
+
# When the application was submitted, in Unix milliseconds.
|
|
150
|
+
created_at:,
|
|
151
|
+
# When the decision was made, in Unix milliseconds. `null` while pending.
|
|
152
|
+
decided_at:,
|
|
153
|
+
# Required applicant email address, or `null` after applicant data is removed
|
|
154
|
+
# under the Program's retention policy.
|
|
155
|
+
email:,
|
|
156
|
+
# Required applicant first name, or `null` after applicant data is removed under
|
|
157
|
+
# the Program's retention policy.
|
|
158
|
+
first_name:,
|
|
159
|
+
# Application ID.
|
|
160
|
+
id:,
|
|
161
|
+
# Required applicant last name, or `null` after applicant data is removed under
|
|
162
|
+
# the Program's retention policy.
|
|
163
|
+
last_name:,
|
|
164
|
+
# ID of the participant created or upgraded by approval. `null` until the
|
|
165
|
+
# application is approved.
|
|
166
|
+
participant_id:,
|
|
167
|
+
# When a denied applicant may apply again, in Unix milliseconds. `null` when not
|
|
168
|
+
# applicable.
|
|
169
|
+
reapply_allowed_at:,
|
|
170
|
+
# The structured reason recorded when the application was denied. `null` until
|
|
171
|
+
# then.
|
|
172
|
+
rejection_reason:,
|
|
173
|
+
# When the application was reviewed, in Unix milliseconds. `null` while pending.
|
|
174
|
+
reviewed_at:,
|
|
175
|
+
# GrowSurf risk assessment. Applications that are not `LOW` risk are held for
|
|
176
|
+
# manual review; `null` means no assessment was recorded.
|
|
177
|
+
risk_level:,
|
|
178
|
+
# Where the application is in review. Only `PENDING` applications can be decided.
|
|
179
|
+
status:,
|
|
180
|
+
# When the applicant accepted the Program Terms, in Unix milliseconds, or `null`
|
|
181
|
+
# when acceptance was not required.
|
|
182
|
+
terms_accepted_at:
|
|
183
|
+
)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
sig do
|
|
187
|
+
override.returns(
|
|
188
|
+
{
|
|
189
|
+
answers: T::Array[GrowsurfRuby::AffiliateApplication::Answer],
|
|
190
|
+
created_at: Integer,
|
|
191
|
+
decided_at: T.nilable(Integer),
|
|
192
|
+
email: T.nilable(String),
|
|
193
|
+
first_name: T.nilable(String),
|
|
194
|
+
id: String,
|
|
195
|
+
last_name: T.nilable(String),
|
|
196
|
+
participant_id: T.nilable(String),
|
|
197
|
+
reapply_allowed_at: T.nilable(Integer),
|
|
198
|
+
rejection_reason: T.nilable(String),
|
|
199
|
+
reviewed_at: T.nilable(Integer),
|
|
200
|
+
risk_level:
|
|
201
|
+
T.nilable(
|
|
202
|
+
GrowsurfRuby::AffiliateApplication::RiskLevel::TaggedSymbol
|
|
203
|
+
),
|
|
204
|
+
status:
|
|
205
|
+
GrowsurfRuby::AffiliateApplication::Status::TaggedSymbol,
|
|
206
|
+
terms_accepted_at: T.nilable(Integer)
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
end
|
|
210
|
+
def to_hash
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
class Answer < GrowsurfRuby::Internal::Type::BaseModel
|
|
214
|
+
OrHash =
|
|
215
|
+
T.type_alias do
|
|
216
|
+
T.any(
|
|
217
|
+
GrowsurfRuby::AffiliateApplication::Answer,
|
|
218
|
+
GrowsurfRuby::Internal::AnyHash
|
|
219
|
+
)
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Stable key of the saved application-form field this answer belongs to.
|
|
223
|
+
sig { returns(String) }
|
|
224
|
+
attr_reader :field_id
|
|
225
|
+
|
|
226
|
+
sig { params(field_id: String).void }
|
|
227
|
+
attr_writer :field_id
|
|
228
|
+
|
|
229
|
+
# Customer-configured field label captured when the applicant submitted.
|
|
230
|
+
sig { returns(String) }
|
|
231
|
+
attr_reader :label
|
|
232
|
+
|
|
233
|
+
sig { params(label: String).void }
|
|
234
|
+
attr_writer :label
|
|
235
|
+
|
|
236
|
+
# Saved field type that determined how the scalar answer was validated.
|
|
237
|
+
sig do
|
|
238
|
+
returns(
|
|
239
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol
|
|
240
|
+
)
|
|
241
|
+
end
|
|
242
|
+
attr_reader :type
|
|
243
|
+
|
|
244
|
+
sig do
|
|
245
|
+
params(
|
|
246
|
+
type: GrowsurfRuby::AffiliateApplication::Answer::Type::OrSymbol
|
|
247
|
+
).void
|
|
248
|
+
end
|
|
249
|
+
attr_writer :type
|
|
250
|
+
|
|
251
|
+
# Applicant answer represented as one validated string, number, or boolean.
|
|
252
|
+
sig { returns(T.any(String, Integer, Float, T::Boolean)) }
|
|
253
|
+
attr_reader :value
|
|
254
|
+
|
|
255
|
+
sig { params(value: T.any(String, Integer, Float, T::Boolean)).void }
|
|
256
|
+
attr_writer :value
|
|
257
|
+
|
|
258
|
+
sig do
|
|
259
|
+
params(
|
|
260
|
+
field_id: String,
|
|
261
|
+
label: String,
|
|
262
|
+
type: GrowsurfRuby::AffiliateApplication::Answer::Type::OrSymbol,
|
|
263
|
+
value: T.any(String, Integer, Float, T::Boolean)
|
|
264
|
+
).returns(T.attached_class)
|
|
265
|
+
end
|
|
266
|
+
def self.new(
|
|
267
|
+
# Stable key of the saved application-form field this answer belongs to.
|
|
268
|
+
field_id:,
|
|
269
|
+
# Customer-configured field label captured when the applicant submitted.
|
|
270
|
+
label:,
|
|
271
|
+
# Saved field type that determined how the scalar answer was validated.
|
|
272
|
+
type:,
|
|
273
|
+
# Applicant answer represented as one validated string, number, or boolean.
|
|
274
|
+
value:
|
|
275
|
+
)
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
sig do
|
|
279
|
+
override.returns(
|
|
280
|
+
{
|
|
281
|
+
field_id: String,
|
|
282
|
+
label: String,
|
|
283
|
+
type:
|
|
284
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol,
|
|
285
|
+
value: T.any(String, Integer, Float, T::Boolean)
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
end
|
|
289
|
+
def to_hash
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
module Type
|
|
293
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
294
|
+
|
|
295
|
+
TaggedSymbol =
|
|
296
|
+
T.type_alias do
|
|
297
|
+
T.all(
|
|
298
|
+
Symbol,
|
|
299
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type
|
|
300
|
+
)
|
|
301
|
+
end
|
|
302
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
303
|
+
|
|
304
|
+
TEXT =
|
|
305
|
+
T.let(
|
|
306
|
+
:text,
|
|
307
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol
|
|
308
|
+
)
|
|
309
|
+
TEXTAREA =
|
|
310
|
+
T.let(
|
|
311
|
+
:textarea,
|
|
312
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol
|
|
313
|
+
)
|
|
314
|
+
URL =
|
|
315
|
+
T.let(
|
|
316
|
+
:url,
|
|
317
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol
|
|
318
|
+
)
|
|
319
|
+
COUNTRY =
|
|
320
|
+
T.let(
|
|
321
|
+
:country,
|
|
322
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol
|
|
323
|
+
)
|
|
324
|
+
NUMBER =
|
|
325
|
+
T.let(
|
|
326
|
+
:number,
|
|
327
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol
|
|
328
|
+
)
|
|
329
|
+
DROPDOWN =
|
|
330
|
+
T.let(
|
|
331
|
+
:dropdown,
|
|
332
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol
|
|
333
|
+
)
|
|
334
|
+
RADIO =
|
|
335
|
+
T.let(
|
|
336
|
+
:radio,
|
|
337
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol
|
|
338
|
+
)
|
|
339
|
+
CHECKBOX =
|
|
340
|
+
T.let(
|
|
341
|
+
:checkbox,
|
|
342
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
sig do
|
|
346
|
+
returns(
|
|
347
|
+
T::Array[
|
|
348
|
+
GrowsurfRuby::AffiliateApplication::Answer::Type::TaggedSymbol
|
|
349
|
+
]
|
|
350
|
+
)
|
|
351
|
+
end
|
|
352
|
+
def self.values
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
# GrowSurf risk assessment. Applications that are not `LOW` risk are held for
|
|
358
|
+
# manual review; `null` means no assessment was recorded.
|
|
359
|
+
module RiskLevel
|
|
360
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
361
|
+
|
|
362
|
+
TaggedSymbol =
|
|
363
|
+
T.type_alias do
|
|
364
|
+
T.all(Symbol, GrowsurfRuby::AffiliateApplication::RiskLevel)
|
|
365
|
+
end
|
|
366
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
367
|
+
|
|
368
|
+
LOW =
|
|
369
|
+
T.let(
|
|
370
|
+
:LOW,
|
|
371
|
+
GrowsurfRuby::AffiliateApplication::RiskLevel::TaggedSymbol
|
|
372
|
+
)
|
|
373
|
+
MEDIUM =
|
|
374
|
+
T.let(
|
|
375
|
+
:MEDIUM,
|
|
376
|
+
GrowsurfRuby::AffiliateApplication::RiskLevel::TaggedSymbol
|
|
377
|
+
)
|
|
378
|
+
HIGH =
|
|
379
|
+
T.let(
|
|
380
|
+
:HIGH,
|
|
381
|
+
GrowsurfRuby::AffiliateApplication::RiskLevel::TaggedSymbol
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
sig do
|
|
385
|
+
override.returns(
|
|
386
|
+
T::Array[
|
|
387
|
+
GrowsurfRuby::AffiliateApplication::RiskLevel::TaggedSymbol
|
|
388
|
+
]
|
|
389
|
+
)
|
|
390
|
+
end
|
|
391
|
+
def self.values
|
|
392
|
+
end
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# Where the application is in review. Only `PENDING` applications can be decided.
|
|
396
|
+
module Status
|
|
397
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
398
|
+
|
|
399
|
+
TaggedSymbol =
|
|
400
|
+
T.type_alias do
|
|
401
|
+
T.all(Symbol, GrowsurfRuby::AffiliateApplication::Status)
|
|
402
|
+
end
|
|
403
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
404
|
+
|
|
405
|
+
PENDING =
|
|
406
|
+
T.let(
|
|
407
|
+
:PENDING,
|
|
408
|
+
GrowsurfRuby::AffiliateApplication::Status::TaggedSymbol
|
|
409
|
+
)
|
|
410
|
+
APPROVED =
|
|
411
|
+
T.let(
|
|
412
|
+
:APPROVED,
|
|
413
|
+
GrowsurfRuby::AffiliateApplication::Status::TaggedSymbol
|
|
414
|
+
)
|
|
415
|
+
DENIED =
|
|
416
|
+
T.let(
|
|
417
|
+
:DENIED,
|
|
418
|
+
GrowsurfRuby::AffiliateApplication::Status::TaggedSymbol
|
|
419
|
+
)
|
|
420
|
+
|
|
421
|
+
sig do
|
|
422
|
+
override.returns(
|
|
423
|
+
T::Array[GrowsurfRuby::AffiliateApplication::Status::TaggedSymbol]
|
|
424
|
+
)
|
|
425
|
+
end
|
|
426
|
+
def self.values
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
end
|
|
431
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class AffiliateApplicationListResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
GrowsurfRuby::Models::AffiliateApplicationListResponse,
|
|
10
|
+
GrowsurfRuby::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# One page of the program's applications, newest first.
|
|
15
|
+
sig { returns(T::Array[GrowsurfRuby::AffiliateApplication]) }
|
|
16
|
+
attr_accessor :applications
|
|
17
|
+
|
|
18
|
+
# Total number of applications matching the filter.
|
|
19
|
+
sig { returns(Integer) }
|
|
20
|
+
attr_accessor :total
|
|
21
|
+
|
|
22
|
+
# The page size used.
|
|
23
|
+
sig { returns(T.nilable(Integer)) }
|
|
24
|
+
attr_reader :limit
|
|
25
|
+
|
|
26
|
+
sig { params(limit: Integer).void }
|
|
27
|
+
attr_writer :limit
|
|
28
|
+
|
|
29
|
+
# The offset this page started at.
|
|
30
|
+
sig { returns(T.nilable(Integer)) }
|
|
31
|
+
attr_reader :offset
|
|
32
|
+
|
|
33
|
+
sig { params(offset: Integer).void }
|
|
34
|
+
attr_writer :offset
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
applications: T::Array[GrowsurfRuby::AffiliateApplication::OrHash],
|
|
39
|
+
total: Integer,
|
|
40
|
+
limit: Integer,
|
|
41
|
+
offset: Integer
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
# One page of the program's applications, newest first.
|
|
46
|
+
applications:,
|
|
47
|
+
# Total number of applications matching the filter.
|
|
48
|
+
total:,
|
|
49
|
+
# The page size used.
|
|
50
|
+
limit: nil,
|
|
51
|
+
# The offset this page started at.
|
|
52
|
+
offset: nil
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
override.returns(
|
|
58
|
+
{
|
|
59
|
+
applications: T::Array[GrowsurfRuby::AffiliateApplication],
|
|
60
|
+
total: Integer,
|
|
61
|
+
limit: Integer,
|
|
62
|
+
offset: Integer
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
def to_hash
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|