growsurf-ruby 0.6.1 → 0.8.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 +15 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/models/campaign/campaign_reward_list_response.rb +21 -0
- data/lib/growsurf_ruby/models/campaign/delete_reward_response.rb +26 -0
- data/lib/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rb +28 -0
- data/lib/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rb +24 -0
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +130 -0
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_response.rb +81 -0
- data/lib/growsurf_ruby/models/campaign/participant_trigger_referral_params.rb +19 -1
- data/lib/growsurf_ruby/models/campaign/reward.rb +166 -0
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +189 -0
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +182 -0
- data/lib/growsurf_ruby/models/campaign_create_params.rb +82 -0
- data/lib/growsurf_ruby/models/campaign_update_params.rb +112 -0
- data/lib/growsurf_ruby/models.rb +4 -0
- data/lib/growsurf_ruby/resources/campaign/participant.rb +98 -3
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +191 -0
- data/lib/growsurf_ruby/resources/campaign.rb +105 -0
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +12 -0
- data/rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi +41 -0
- data/rbi/growsurf_ruby/models/campaign/delete_reward_response.rbi +38 -0
- data/rbi/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rbi +48 -0
- data/rbi/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rbi +36 -0
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +234 -0
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_response.rbi +131 -0
- data/rbi/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbi +24 -1
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +252 -0
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +330 -0
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +281 -0
- data/rbi/growsurf_ruby/models/campaign_create_params.rbi +143 -0
- data/rbi/growsurf_ruby/models/campaign_update_params.rbi +193 -0
- data/rbi/growsurf_ruby/models.rbi +4 -0
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +94 -0
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +200 -0
- data/rbi/growsurf_ruby/resources/campaign.rbi +99 -0
- data/sig/growsurf_ruby/models/campaign/campaign_reward_list_response.rbs +18 -0
- data/sig/growsurf_ruby/models/campaign/delete_reward_response.rbs +17 -0
- data/sig/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rbs +20 -0
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +151 -0
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_response.rbs +75 -0
- data/sig/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbs +7 -1
- data/sig/growsurf_ruby/models/campaign/reward.rbs +131 -0
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +192 -0
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +182 -0
- data/sig/growsurf_ruby/models/campaign_create_params.rbs +88 -0
- data/sig/growsurf_ruby/models/campaign_update_params.rbs +119 -0
- data/sig/growsurf_ruby/models.rbs +4 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +28 -0
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +70 -0
- data/sig/growsurf_ruby/resources/campaign.rbs +35 -0
- metadata +38 -2
|
@@ -14,6 +14,10 @@ module GrowsurfRuby
|
|
|
14
14
|
sig { returns(GrowsurfRuby::Resources::Campaign::Commission) }
|
|
15
15
|
attr_reader :commission
|
|
16
16
|
|
|
17
|
+
# Program reward configuration operations.
|
|
18
|
+
sig { returns(GrowsurfRuby::Resources::Campaign::Rewards) }
|
|
19
|
+
attr_reader :rewards
|
|
20
|
+
|
|
17
21
|
# Retrieves a program for the given program ID.
|
|
18
22
|
sig do
|
|
19
23
|
params(
|
|
@@ -37,6 +41,101 @@ module GrowsurfRuby
|
|
|
37
41
|
def list(request_options: {})
|
|
38
42
|
end
|
|
39
43
|
|
|
44
|
+
# Creates a program. Only `type` is required; everything else is server-defaulted.
|
|
45
|
+
sig do
|
|
46
|
+
params(
|
|
47
|
+
type: GrowsurfRuby::CampaignCreateParams::Type::OrSymbol,
|
|
48
|
+
company_logo_image_url: String,
|
|
49
|
+
company_name: String,
|
|
50
|
+
currency_iso: String,
|
|
51
|
+
goal: String,
|
|
52
|
+
name: String,
|
|
53
|
+
options: T::Hash[Symbol, T.anything],
|
|
54
|
+
rewards: T::Array[GrowsurfRuby::Campaign::RewardCreateParams::OrHash],
|
|
55
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
56
|
+
).returns(GrowsurfRuby::CampaignAPI)
|
|
57
|
+
end
|
|
58
|
+
def create(
|
|
59
|
+
# The program type. Immutable after creation.
|
|
60
|
+
type:,
|
|
61
|
+
company_logo_image_url: nil,
|
|
62
|
+
company_name: nil,
|
|
63
|
+
# ISO 4217 currency code. Defaults to USD.
|
|
64
|
+
currency_iso: nil,
|
|
65
|
+
goal: nil,
|
|
66
|
+
# The program name. Defaults to "Untitled Program".
|
|
67
|
+
name: nil,
|
|
68
|
+
# A curated subset of program options to shallow-merge onto the defaults.
|
|
69
|
+
options: nil,
|
|
70
|
+
# Optional inline rewards to create with the program.
|
|
71
|
+
rewards: nil,
|
|
72
|
+
request_options: {}
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Updates a program. Only the fields you send are changed. `type` and `urlId` are
|
|
77
|
+
# immutable.
|
|
78
|
+
sig do
|
|
79
|
+
params(
|
|
80
|
+
id: String,
|
|
81
|
+
company_logo_image_url: String,
|
|
82
|
+
company_name: String,
|
|
83
|
+
currency_iso: String,
|
|
84
|
+
design: T::Hash[Symbol, T.anything],
|
|
85
|
+
emails: T::Hash[Symbol, T.anything],
|
|
86
|
+
goal: String,
|
|
87
|
+
installation: T::Hash[Symbol, T.anything],
|
|
88
|
+
name: String,
|
|
89
|
+
notifications: T::Hash[Symbol, T.anything],
|
|
90
|
+
options: T::Hash[Symbol, T.anything],
|
|
91
|
+
status: GrowsurfRuby::CampaignUpdateParams::Status::OrSymbol,
|
|
92
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
93
|
+
).returns(GrowsurfRuby::CampaignAPI)
|
|
94
|
+
end
|
|
95
|
+
def update(
|
|
96
|
+
# Path param: GrowSurf program ID.
|
|
97
|
+
id,
|
|
98
|
+
# Body param
|
|
99
|
+
company_logo_image_url: nil,
|
|
100
|
+
# Body param
|
|
101
|
+
company_name: nil,
|
|
102
|
+
# Body param
|
|
103
|
+
currency_iso: nil,
|
|
104
|
+
# Body param
|
|
105
|
+
design: nil,
|
|
106
|
+
# Body param
|
|
107
|
+
emails: nil,
|
|
108
|
+
# Body param
|
|
109
|
+
goal: nil,
|
|
110
|
+
# Body param
|
|
111
|
+
installation: nil,
|
|
112
|
+
# Body param
|
|
113
|
+
name: nil,
|
|
114
|
+
# Body param
|
|
115
|
+
notifications: nil,
|
|
116
|
+
# Body param
|
|
117
|
+
options: nil,
|
|
118
|
+
# Body param: The program status. Transitions are validated; DELETED is not
|
|
119
|
+
# allowed.
|
|
120
|
+
status: nil,
|
|
121
|
+
request_options: {}
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Clones an existing program, returning the newly created program.
|
|
126
|
+
sig do
|
|
127
|
+
params(
|
|
128
|
+
id: String,
|
|
129
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
130
|
+
).returns(GrowsurfRuby::CampaignAPI)
|
|
131
|
+
end
|
|
132
|
+
def clone(
|
|
133
|
+
# GrowSurf program ID.
|
|
134
|
+
id,
|
|
135
|
+
request_options: {}
|
|
136
|
+
)
|
|
137
|
+
end
|
|
138
|
+
|
|
40
139
|
# Creates or returns a participant using the same input behavior as Add
|
|
41
140
|
# Participant, then returns a participant-scoped token for GrowSurf mobile SDK
|
|
42
141
|
# participant endpoints. Use this endpoint from your backend after your mobile app
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type campaign_reward_list_response =
|
|
5
|
+
{ rewards: ::Array[GrowsurfRuby::Campaign::Reward] }
|
|
6
|
+
|
|
7
|
+
class CampaignRewardListResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
attr_accessor rewards: ::Array[GrowsurfRuby::Campaign::Reward]
|
|
9
|
+
|
|
10
|
+
def initialize: (
|
|
11
|
+
rewards: ::Array[GrowsurfRuby::Campaign::Reward]
|
|
12
|
+
) -> void
|
|
13
|
+
|
|
14
|
+
def to_hash: -> { rewards: ::Array[GrowsurfRuby::Campaign::Reward] }
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type delete_reward_response = { id: String, success: bool }
|
|
5
|
+
|
|
6
|
+
class DeleteRewardResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor id: String
|
|
8
|
+
|
|
9
|
+
attr_accessor success: bool
|
|
10
|
+
|
|
11
|
+
def initialize: (id: String, success: bool) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> { id: String, success: bool }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type participant_cancel_delayed_referral_params =
|
|
5
|
+
{ id: String, participant_id_or_email: String }
|
|
6
|
+
& GrowsurfRuby::Internal::Type::request_parameters
|
|
7
|
+
|
|
8
|
+
class ParticipantCancelDelayedReferralParams < 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,20 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type participant_cancel_delayed_referral_response =
|
|
5
|
+
{ success: bool, message: String }
|
|
6
|
+
|
|
7
|
+
class ParticipantCancelDelayedReferralResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
attr_accessor success: bool
|
|
9
|
+
|
|
10
|
+
attr_reader message: String?
|
|
11
|
+
|
|
12
|
+
def message=: (String) -> String
|
|
13
|
+
|
|
14
|
+
def initialize: (success: bool, ?message: String) -> void
|
|
15
|
+
|
|
16
|
+
def to_hash: -> { success: bool, message: String }
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type participant_refund_transaction_params =
|
|
5
|
+
{
|
|
6
|
+
id: String,
|
|
7
|
+
participant_id_or_email: String,
|
|
8
|
+
amendment_type: GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::amendment_type,
|
|
9
|
+
amount: Integer,
|
|
10
|
+
amount_refunded: Integer,
|
|
11
|
+
charge_id: String,
|
|
12
|
+
currency: String,
|
|
13
|
+
description: String,
|
|
14
|
+
external_id: String,
|
|
15
|
+
invoice_id: String,
|
|
16
|
+
order_id: String,
|
|
17
|
+
payment_id: String,
|
|
18
|
+
payment_intent_id: String,
|
|
19
|
+
refund_amount: Integer,
|
|
20
|
+
refund_id: String,
|
|
21
|
+
refund_status: String,
|
|
22
|
+
transaction_id: String
|
|
23
|
+
}
|
|
24
|
+
& GrowsurfRuby::Internal::Type::request_parameters
|
|
25
|
+
|
|
26
|
+
class ParticipantRefundTransactionParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
27
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
28
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
29
|
+
|
|
30
|
+
attr_accessor id: String
|
|
31
|
+
|
|
32
|
+
attr_accessor participant_id_or_email: String
|
|
33
|
+
|
|
34
|
+
attr_reader amendment_type: GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::amendment_type?
|
|
35
|
+
|
|
36
|
+
def amendment_type=: (
|
|
37
|
+
GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::amendment_type
|
|
38
|
+
) -> GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::amendment_type
|
|
39
|
+
|
|
40
|
+
attr_reader amount: Integer?
|
|
41
|
+
|
|
42
|
+
def amount=: (Integer) -> Integer
|
|
43
|
+
|
|
44
|
+
attr_reader amount_refunded: Integer?
|
|
45
|
+
|
|
46
|
+
def amount_refunded=: (Integer) -> Integer
|
|
47
|
+
|
|
48
|
+
attr_reader charge_id: String?
|
|
49
|
+
|
|
50
|
+
def charge_id=: (String) -> String
|
|
51
|
+
|
|
52
|
+
attr_reader currency: String?
|
|
53
|
+
|
|
54
|
+
def currency=: (String) -> String
|
|
55
|
+
|
|
56
|
+
attr_reader description: String?
|
|
57
|
+
|
|
58
|
+
def description=: (String) -> String
|
|
59
|
+
|
|
60
|
+
attr_reader external_id: String?
|
|
61
|
+
|
|
62
|
+
def external_id=: (String) -> String
|
|
63
|
+
|
|
64
|
+
attr_reader invoice_id: String?
|
|
65
|
+
|
|
66
|
+
def invoice_id=: (String) -> String
|
|
67
|
+
|
|
68
|
+
attr_reader order_id: String?
|
|
69
|
+
|
|
70
|
+
def order_id=: (String) -> String
|
|
71
|
+
|
|
72
|
+
attr_reader payment_id: String?
|
|
73
|
+
|
|
74
|
+
def payment_id=: (String) -> String
|
|
75
|
+
|
|
76
|
+
attr_reader payment_intent_id: String?
|
|
77
|
+
|
|
78
|
+
def payment_intent_id=: (String) -> String
|
|
79
|
+
|
|
80
|
+
attr_reader refund_amount: Integer?
|
|
81
|
+
|
|
82
|
+
def refund_amount=: (Integer) -> Integer
|
|
83
|
+
|
|
84
|
+
attr_reader refund_id: String?
|
|
85
|
+
|
|
86
|
+
def refund_id=: (String) -> String
|
|
87
|
+
|
|
88
|
+
attr_reader refund_status: String?
|
|
89
|
+
|
|
90
|
+
def refund_status=: (String) -> String
|
|
91
|
+
|
|
92
|
+
attr_reader transaction_id: String?
|
|
93
|
+
|
|
94
|
+
def transaction_id=: (String) -> String
|
|
95
|
+
|
|
96
|
+
def initialize: (
|
|
97
|
+
id: String,
|
|
98
|
+
participant_id_or_email: String,
|
|
99
|
+
?amendment_type: GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::amendment_type,
|
|
100
|
+
?amount: Integer,
|
|
101
|
+
?amount_refunded: Integer,
|
|
102
|
+
?charge_id: String,
|
|
103
|
+
?currency: String,
|
|
104
|
+
?description: String,
|
|
105
|
+
?external_id: String,
|
|
106
|
+
?invoice_id: String,
|
|
107
|
+
?order_id: String,
|
|
108
|
+
?payment_id: String,
|
|
109
|
+
?payment_intent_id: String,
|
|
110
|
+
?refund_amount: Integer,
|
|
111
|
+
?refund_id: String,
|
|
112
|
+
?refund_status: String,
|
|
113
|
+
?transaction_id: String,
|
|
114
|
+
?request_options: GrowsurfRuby::request_opts
|
|
115
|
+
) -> void
|
|
116
|
+
|
|
117
|
+
def to_hash: -> {
|
|
118
|
+
id: String,
|
|
119
|
+
participant_id_or_email: String,
|
|
120
|
+
amendment_type: GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::amendment_type,
|
|
121
|
+
amount: Integer,
|
|
122
|
+
amount_refunded: Integer,
|
|
123
|
+
charge_id: String,
|
|
124
|
+
currency: String,
|
|
125
|
+
description: String,
|
|
126
|
+
external_id: String,
|
|
127
|
+
invoice_id: String,
|
|
128
|
+
order_id: String,
|
|
129
|
+
payment_id: String,
|
|
130
|
+
payment_intent_id: String,
|
|
131
|
+
refund_amount: Integer,
|
|
132
|
+
refund_id: String,
|
|
133
|
+
refund_status: String,
|
|
134
|
+
transaction_id: String,
|
|
135
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
type amendment_type = :REFUND | :CHARGEBACK
|
|
139
|
+
|
|
140
|
+
module AmendmentType
|
|
141
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
142
|
+
|
|
143
|
+
REFUND: :REFUND
|
|
144
|
+
CHARGEBACK: :CHARGEBACK
|
|
145
|
+
|
|
146
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::amendment_type]
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type participant_refund_transaction_response =
|
|
5
|
+
{
|
|
6
|
+
adjusted: Integer,
|
|
7
|
+
amendment_type: GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::amendment_type,
|
|
8
|
+
deleted: Integer,
|
|
9
|
+
matched: Integer,
|
|
10
|
+
matching_commission_ids: ::Array[String],
|
|
11
|
+
message: String,
|
|
12
|
+
reversed: Integer,
|
|
13
|
+
success: bool,
|
|
14
|
+
not_found: bool
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class ParticipantRefundTransactionResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
18
|
+
attr_accessor adjusted: Integer
|
|
19
|
+
|
|
20
|
+
attr_accessor amendment_type: GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::amendment_type
|
|
21
|
+
|
|
22
|
+
attr_accessor deleted: Integer
|
|
23
|
+
|
|
24
|
+
attr_accessor matched: Integer
|
|
25
|
+
|
|
26
|
+
attr_accessor matching_commission_ids: ::Array[String]
|
|
27
|
+
|
|
28
|
+
attr_accessor message: String
|
|
29
|
+
|
|
30
|
+
attr_accessor reversed: Integer
|
|
31
|
+
|
|
32
|
+
attr_accessor success: bool
|
|
33
|
+
|
|
34
|
+
attr_reader not_found: bool?
|
|
35
|
+
|
|
36
|
+
def not_found=: (bool) -> bool
|
|
37
|
+
|
|
38
|
+
def initialize: (
|
|
39
|
+
adjusted: Integer,
|
|
40
|
+
amendment_type: GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::amendment_type,
|
|
41
|
+
deleted: Integer,
|
|
42
|
+
matched: Integer,
|
|
43
|
+
matching_commission_ids: ::Array[String],
|
|
44
|
+
message: String,
|
|
45
|
+
reversed: Integer,
|
|
46
|
+
success: bool,
|
|
47
|
+
?not_found: bool
|
|
48
|
+
) -> void
|
|
49
|
+
|
|
50
|
+
def to_hash: -> {
|
|
51
|
+
adjusted: Integer,
|
|
52
|
+
amendment_type: GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::amendment_type,
|
|
53
|
+
deleted: Integer,
|
|
54
|
+
matched: Integer,
|
|
55
|
+
matching_commission_ids: ::Array[String],
|
|
56
|
+
message: String,
|
|
57
|
+
reversed: Integer,
|
|
58
|
+
success: bool,
|
|
59
|
+
not_found: bool
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
type amendment_type = :REFUND | :CHARGEBACK
|
|
63
|
+
|
|
64
|
+
module AmendmentType
|
|
65
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
66
|
+
|
|
67
|
+
REFUND: :REFUND
|
|
68
|
+
CHARGEBACK: :CHARGEBACK
|
|
69
|
+
|
|
70
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::amendment_type]
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -2,7 +2,7 @@ module GrowsurfRuby
|
|
|
2
2
|
module Models
|
|
3
3
|
module Campaign
|
|
4
4
|
type participant_trigger_referral_params =
|
|
5
|
-
{ id: String, participant_id_or_email: String }
|
|
5
|
+
{ id: String, participant_id_or_email: String, delay_in_days: Integer }
|
|
6
6
|
& GrowsurfRuby::Internal::Type::request_parameters
|
|
7
7
|
|
|
8
8
|
class ParticipantTriggerReferralParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
@@ -13,15 +13,21 @@ module GrowsurfRuby
|
|
|
13
13
|
|
|
14
14
|
attr_accessor participant_id_or_email: String
|
|
15
15
|
|
|
16
|
+
attr_reader delay_in_days: Integer?
|
|
17
|
+
|
|
18
|
+
def delay_in_days=: (Integer) -> Integer
|
|
19
|
+
|
|
16
20
|
def initialize: (
|
|
17
21
|
id: String,
|
|
18
22
|
participant_id_or_email: String,
|
|
23
|
+
?delay_in_days: Integer,
|
|
19
24
|
?request_options: GrowsurfRuby::request_opts
|
|
20
25
|
) -> void
|
|
21
26
|
|
|
22
27
|
def to_hash: -> {
|
|
23
28
|
id: String,
|
|
24
29
|
participant_id_or_email: String,
|
|
30
|
+
delay_in_days: Integer,
|
|
25
31
|
request_options: GrowsurfRuby::RequestOptions
|
|
26
32
|
}
|
|
27
33
|
end
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type reward =
|
|
5
|
+
{
|
|
6
|
+
id: String,
|
|
7
|
+
is_unlimited: bool,
|
|
8
|
+
metadata: ::Hash[Symbol, top],
|
|
9
|
+
type: GrowsurfRuby::Models::Campaign::Reward::type_,
|
|
10
|
+
commission_structure: GrowsurfRuby::CommissionStructure?,
|
|
11
|
+
conversions_required: Integer?,
|
|
12
|
+
coupon_code: String?,
|
|
13
|
+
description: String?,
|
|
14
|
+
image_url: String?,
|
|
15
|
+
limit: Integer?,
|
|
16
|
+
limit_duration: GrowsurfRuby::Models::Campaign::Reward::limit_duration?,
|
|
17
|
+
next_milestone_prefix: String?,
|
|
18
|
+
next_milestone_suffix: String?,
|
|
19
|
+
number_of_winners: Integer?,
|
|
20
|
+
order: Integer?,
|
|
21
|
+
referral_description: String?,
|
|
22
|
+
referred_reward_upfront: bool
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
class Reward < GrowsurfRuby::Internal::Type::BaseModel
|
|
26
|
+
attr_accessor id: String
|
|
27
|
+
|
|
28
|
+
attr_accessor is_unlimited: bool
|
|
29
|
+
|
|
30
|
+
attr_accessor metadata: ::Hash[Symbol, top]
|
|
31
|
+
|
|
32
|
+
attr_accessor type: GrowsurfRuby::Models::Campaign::Reward::type_
|
|
33
|
+
|
|
34
|
+
attr_accessor commission_structure: GrowsurfRuby::CommissionStructure?
|
|
35
|
+
|
|
36
|
+
attr_accessor conversions_required: Integer?
|
|
37
|
+
|
|
38
|
+
attr_accessor coupon_code: String?
|
|
39
|
+
|
|
40
|
+
attr_accessor description: String?
|
|
41
|
+
|
|
42
|
+
attr_accessor image_url: String?
|
|
43
|
+
|
|
44
|
+
attr_accessor limit: Integer?
|
|
45
|
+
|
|
46
|
+
attr_accessor limit_duration: GrowsurfRuby::Models::Campaign::Reward::limit_duration?
|
|
47
|
+
|
|
48
|
+
attr_accessor next_milestone_prefix: String?
|
|
49
|
+
|
|
50
|
+
attr_accessor next_milestone_suffix: String?
|
|
51
|
+
|
|
52
|
+
attr_accessor number_of_winners: Integer?
|
|
53
|
+
|
|
54
|
+
attr_accessor order: Integer?
|
|
55
|
+
|
|
56
|
+
attr_accessor referral_description: String?
|
|
57
|
+
|
|
58
|
+
attr_reader referred_reward_upfront: bool?
|
|
59
|
+
|
|
60
|
+
def referred_reward_upfront=: (bool) -> bool
|
|
61
|
+
|
|
62
|
+
def initialize: (
|
|
63
|
+
id: String,
|
|
64
|
+
is_unlimited: bool,
|
|
65
|
+
metadata: ::Hash[Symbol, top],
|
|
66
|
+
type: GrowsurfRuby::Models::Campaign::Reward::type_,
|
|
67
|
+
?commission_structure: GrowsurfRuby::CommissionStructure?,
|
|
68
|
+
?conversions_required: Integer?,
|
|
69
|
+
?coupon_code: String?,
|
|
70
|
+
?description: String?,
|
|
71
|
+
?image_url: String?,
|
|
72
|
+
?limit: Integer?,
|
|
73
|
+
?limit_duration: GrowsurfRuby::Models::Campaign::Reward::limit_duration?,
|
|
74
|
+
?next_milestone_prefix: String?,
|
|
75
|
+
?next_milestone_suffix: String?,
|
|
76
|
+
?number_of_winners: Integer?,
|
|
77
|
+
?order: Integer?,
|
|
78
|
+
?referral_description: String?,
|
|
79
|
+
?referred_reward_upfront: bool
|
|
80
|
+
) -> void
|
|
81
|
+
|
|
82
|
+
def to_hash: -> {
|
|
83
|
+
id: String,
|
|
84
|
+
is_unlimited: bool,
|
|
85
|
+
metadata: ::Hash[Symbol, top],
|
|
86
|
+
type: GrowsurfRuby::Models::Campaign::Reward::type_,
|
|
87
|
+
commission_structure: GrowsurfRuby::CommissionStructure?,
|
|
88
|
+
conversions_required: Integer?,
|
|
89
|
+
coupon_code: String?,
|
|
90
|
+
description: String?,
|
|
91
|
+
image_url: String?,
|
|
92
|
+
limit: Integer?,
|
|
93
|
+
limit_duration: GrowsurfRuby::Models::Campaign::Reward::limit_duration?,
|
|
94
|
+
next_milestone_prefix: String?,
|
|
95
|
+
next_milestone_suffix: String?,
|
|
96
|
+
number_of_winners: Integer?,
|
|
97
|
+
order: Integer?,
|
|
98
|
+
referral_description: String?,
|
|
99
|
+
referred_reward_upfront: bool
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
type type_ =
|
|
103
|
+
:SINGLE_SIDED | :DOUBLE_SIDED | :MILESTONE | :LEADERBOARD | :AFFILIATE
|
|
104
|
+
|
|
105
|
+
module Type
|
|
106
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
107
|
+
|
|
108
|
+
SINGLE_SIDED: :SINGLE_SIDED
|
|
109
|
+
DOUBLE_SIDED: :DOUBLE_SIDED
|
|
110
|
+
MILESTONE: :MILESTONE
|
|
111
|
+
LEADERBOARD: :LEADERBOARD
|
|
112
|
+
AFFILIATE: :AFFILIATE
|
|
113
|
+
|
|
114
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::Reward::type_]
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
|
|
118
|
+
|
|
119
|
+
module LimitDuration
|
|
120
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
121
|
+
|
|
122
|
+
IN_TOTAL: :IN_TOTAL
|
|
123
|
+
PER_MONTH: :PER_MONTH
|
|
124
|
+
PER_YEAR: :PER_YEAR
|
|
125
|
+
|
|
126
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::Reward::limit_duration]
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|