growsurf-ruby 1.4.0 → 1.5.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 +34 -0
- data/README.md +10 -7
- data/lib/growsurf_ruby/internal/transport/base_client.rb +6 -1
- data/lib/growsurf_ruby/internal/type/base_model.rb +26 -0
- data/lib/growsurf_ruby/internal/type/base_page.rb +6 -0
- data/lib/growsurf_ruby/models/account_create_response.rb +3 -3
- data/lib/growsurf_ruby/models/analytics_availability.rb +16 -0
- data/lib/growsurf_ruby/models/analytics_unavailable_reason.rb +20 -0
- data/lib/growsurf_ruby/models/campaign/delete_program_resource_response.rb +12 -0
- data/lib/growsurf_ruby/models/campaign/integration.rb +69 -0
- data/lib/growsurf_ruby/models/campaign/integration_list_response.rb +24 -0
- data/lib/growsurf_ruby/models/campaign/participant_activation_analytics.rb +75 -0
- data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +11 -0
- data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rb +17 -17
- data/lib/growsurf_ruby/models/campaign/participant_record_transaction_params.rb +9 -1
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +17 -1
- data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rb +8 -8
- data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +4 -3
- data/lib/growsurf_ruby/models/campaign/participant_reward.rb +15 -3
- data/lib/growsurf_ruby/models/campaign/program_resource.rb +51 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_create_params.rb +32 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_delete_params.rb +14 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_list_response.rb +12 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_update_params.rb +35 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_upload_result.rb +33 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_upload_ticket.rb +26 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rb +17 -0
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +9 -8
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +9 -8
- data/lib/growsurf_ruby/models/campaign.rb +3 -1
- data/lib/growsurf_ruby/models/campaign_activation_analytics_response.rb +186 -0
- data/lib/growsurf_ruby/models/campaign_create_params.rb +37 -1
- data/lib/growsurf_ruby/models/campaign_engagement_analytics.rb +174 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rb +35 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +37 -4
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +3 -0
- data/lib/growsurf_ruby/models/commission_structure.rb +4 -1
- data/lib/growsurf_ruby/models/participant_commission_list.rb +5 -5
- data/lib/growsurf_ruby/models/participant_payout_list.rb +5 -5
- data/lib/growsurf_ruby/models.rb +7 -0
- data/lib/growsurf_ruby/resources/account.rb +24 -14
- data/lib/growsurf_ruby/resources/campaign/design.rb +11 -5
- data/lib/growsurf_ruby/resources/campaign/emails.rb +2 -1
- data/lib/growsurf_ruby/resources/campaign/integrations.rb +41 -0
- data/lib/growsurf_ruby/resources/campaign/participant.rb +25 -24
- data/lib/growsurf_ruby/resources/campaign/program_resources.rb +112 -0
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +6 -4
- data/lib/growsurf_ruby/resources/campaign.rb +53 -7
- data/lib/growsurf_ruby/resources/team.rb +7 -5
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +19 -0
- data/rbi/growsurf_ruby/internal/type/base_model.rbi +10 -0
- data/rbi/growsurf_ruby/internal/type/base_page.rbi +3 -0
- data/rbi/growsurf_ruby/models/analytics_availability.rbi +19 -0
- data/rbi/growsurf_ruby/models/analytics_unavailable_reason.rbi +23 -0
- data/rbi/growsurf_ruby/models/campaign/delete_program_resource_response.rbi +33 -0
- data/rbi/growsurf_ruby/models/campaign/integration.rbi +93 -0
- data/rbi/growsurf_ruby/models/campaign/integration_list_response.rbi +46 -0
- data/rbi/growsurf_ruby/models/campaign/participant_activation_analytics.rbi +133 -0
- data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +35 -0
- data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbi +17 -23
- data/rbi/growsurf_ruby/models/campaign/participant_record_transaction_params.rbi +18 -0
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +18 -0
- data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbi +7 -9
- data/rbi/growsurf_ruby/models/campaign/participant_reward.rbi +24 -6
- data/rbi/growsurf_ruby/models/campaign/program_resource.rbi +186 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_create_params.rbi +95 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_delete_params.rbi +37 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_list_response.rbi +29 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_update_params.rbi +105 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_upload_result.rbi +94 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_upload_ticket.rbi +57 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rbi +53 -0
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +33 -24
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +33 -24
- data/rbi/growsurf_ruby/models/campaign.rbi +6 -3
- data/rbi/growsurf_ruby/models/campaign_activation_analytics_response.rbi +325 -0
- data/rbi/growsurf_ruby/models/campaign_create_params.rbi +91 -0
- data/rbi/growsurf_ruby/models/campaign_engagement_analytics.rbi +369 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rbi +59 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +56 -3
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +27 -7
- data/rbi/growsurf_ruby/models/commission_structure.rbi +3 -1
- data/rbi/growsurf_ruby/models/participant_commission_list.rbi +15 -15
- data/rbi/growsurf_ruby/models/participant_payout_list.rbi +15 -15
- data/rbi/growsurf_ruby/models.rbi +7 -0
- data/rbi/growsurf_ruby/resources/account.rbi +9 -6
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +32 -4
- data/rbi/growsurf_ruby/resources/campaign/emails.rbi +2 -1
- data/rbi/growsurf_ruby/resources/campaign/integrations.rbi +35 -0
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +27 -18
- data/rbi/growsurf_ruby/resources/campaign/program_resources.rbi +116 -0
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +21 -16
- data/rbi/growsurf_ruby/resources/campaign.rbi +53 -5
- data/rbi/growsurf_ruby/resources/team.rbi +7 -5
- data/sig/growsurf_ruby/internal/type/base_model.rbs +6 -0
- data/sig/growsurf_ruby/internal/type/base_page.rbs +2 -0
- data/sig/growsurf_ruby/models/analytics_availability.rbs +15 -0
- data/sig/growsurf_ruby/models/analytics_unavailable_reason.rbs +26 -0
- data/sig/growsurf_ruby/models/campaign/delete_program_resource_response.rbs +14 -0
- data/sig/growsurf_ruby/models/campaign/integration.rbs +47 -0
- data/sig/growsurf_ruby/models/campaign/integration_list_response.rbs +20 -0
- data/sig/growsurf_ruby/models/campaign/participant_activation_analytics.rbs +96 -0
- data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +22 -1
- data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbs +17 -22
- data/sig/growsurf_ruby/models/campaign/participant_record_transaction_params.rbs +15 -1
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +15 -1
- data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbs +8 -10
- data/sig/growsurf_ruby/models/campaign/participant_reward.rbs +22 -8
- data/sig/growsurf_ruby/models/campaign/program_resource.rbs +94 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_create_params.rbs +45 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_delete_params.rbs +22 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_list_response.rbs +14 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_update_params.rbs +48 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_upload_result.rbs +58 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_upload_ticket.rbs +29 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rbs +29 -0
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +34 -34
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +34 -34
- data/sig/growsurf_ruby/models/campaign.rbs +7 -5
- data/sig/growsurf_ruby/models/campaign_activation_analytics_response.rbs +202 -0
- data/sig/growsurf_ruby/models/campaign_create_params.rbs +29 -0
- data/sig/growsurf_ruby/models/campaign_engagement_analytics.rbs +186 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rbs +45 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_params.rbs +30 -1
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +21 -3
- data/sig/growsurf_ruby/models/participant_commission_list.rbs +20 -20
- data/sig/growsurf_ruby/models/participant_payout_list.rbs +20 -20
- data/sig/growsurf_ruby/models.rbs +6 -0
- data/sig/growsurf_ruby/resources/campaign/design.rbs +19 -0
- data/sig/growsurf_ruby/resources/campaign/integrations.rbs +14 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +4 -0
- data/sig/growsurf_ruby/resources/campaign/program_resources.rbs +58 -0
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +12 -12
- data/sig/growsurf_ruby/resources/campaign.rbs +17 -0
- metadata +59 -2
|
@@ -8,7 +8,7 @@ module GrowsurfRuby
|
|
|
8
8
|
#
|
|
9
9
|
# @overload retrieve(participant_id_or_email, id:, request_options: {})
|
|
10
10
|
#
|
|
11
|
-
# @param participant_id_or_email [String] GrowSurf participant ID or
|
|
11
|
+
# @param participant_id_or_email [String] GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
12
12
|
#
|
|
13
13
|
# @param id [String] GrowSurf program ID.
|
|
14
14
|
#
|
|
@@ -39,7 +39,7 @@ module GrowsurfRuby
|
|
|
39
39
|
#
|
|
40
40
|
# @overload update(participant_id_or_email, id:, affiliate_status: nil, email: nil, first_name: nil, last_name: nil, metadata: nil, notes: nil, referral_status: nil, referred_by: nil, unsubscribed: nil, vanity_keys: nil, request_options: {})
|
|
41
41
|
#
|
|
42
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
42
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
43
43
|
#
|
|
44
44
|
# @param id [String] Path param: GrowSurf program ID.
|
|
45
45
|
#
|
|
@@ -87,7 +87,7 @@ module GrowsurfRuby
|
|
|
87
87
|
#
|
|
88
88
|
# @overload delete(participant_id_or_email, id:, request_options: {})
|
|
89
89
|
#
|
|
90
|
-
# @param participant_id_or_email [String] GrowSurf participant ID or
|
|
90
|
+
# @param participant_id_or_email [String] GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
91
91
|
#
|
|
92
92
|
# @param id [String] GrowSurf program ID.
|
|
93
93
|
#
|
|
@@ -200,7 +200,7 @@ module GrowsurfRuby
|
|
|
200
200
|
#
|
|
201
201
|
# @overload list_commissions(participant_id_or_email, id:, limit: nil, next_id: nil, status: nil, request_options: {})
|
|
202
202
|
#
|
|
203
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
203
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
204
204
|
#
|
|
205
205
|
# @param id [String] Path param: GrowSurf program ID.
|
|
206
206
|
#
|
|
@@ -236,7 +236,7 @@ module GrowsurfRuby
|
|
|
236
236
|
#
|
|
237
237
|
# @overload list_payouts(participant_id_or_email, id:, limit: nil, next_id: nil, status: nil, request_options: {})
|
|
238
238
|
#
|
|
239
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
239
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
240
240
|
#
|
|
241
241
|
# @param id [String] Path param: GrowSurf program ID.
|
|
242
242
|
#
|
|
@@ -271,7 +271,7 @@ module GrowsurfRuby
|
|
|
271
271
|
#
|
|
272
272
|
# @overload list_referrals(participant_id_or_email, id:, desc: nil, email: nil, first_name: nil, last_name: nil, limit: nil, next_id: nil, offset: nil, referral_status: nil, sort_by: nil, request_options: {})
|
|
273
273
|
#
|
|
274
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
274
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
275
275
|
#
|
|
276
276
|
# @param id [String] Path param: GrowSurf program ID.
|
|
277
277
|
#
|
|
@@ -324,7 +324,7 @@ module GrowsurfRuby
|
|
|
324
324
|
#
|
|
325
325
|
# @overload list_rewards(participant_id_or_email, id:, limit: nil, next_id: nil, request_options: {})
|
|
326
326
|
#
|
|
327
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
327
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
328
328
|
#
|
|
329
329
|
# @param id [String] Path param: GrowSurf program ID.
|
|
330
330
|
#
|
|
@@ -360,9 +360,9 @@ module GrowsurfRuby
|
|
|
360
360
|
# de-duplicated — without one, a resent sale would create a second commission.
|
|
361
361
|
# Reuse the same identifier(s) when refunding.
|
|
362
362
|
#
|
|
363
|
-
# @overload record_transaction(participant_id_or_email, id:, currency:, gross_amount:, amount_cash_net: nil, amount_paid: nil, charge_id: nil, customer_id: nil, description: nil, external_id: nil, invoice_id: nil, invoice_subtotal_excluding_tax: nil, invoice_total: nil, invoice_total_excluding_tax: nil, net_amount: nil, order_id: nil, paid_at: nil, payment_id: nil, payment_intent_id: nil, subscription_id: nil, tax_amount: nil, total_tax_amount: nil, total_tax_amounts: nil, total_taxes: nil, transaction_id: nil, request_options: {})
|
|
363
|
+
# @overload record_transaction(participant_id_or_email, id:, currency:, gross_amount:, amount_cash_net: nil, amount_paid: nil, charge_id: nil, customer_id: nil, description: nil, external_id: nil, invoice_id: nil, invoice_subtotal_excluding_tax: nil, invoice_total: nil, invoice_total_excluding_tax: nil, net_amount: nil, order_id: nil, paid_at: nil, payment_id: nil, payment_intent_id: nil, subscription_id: nil, tax_amount: nil, total_tax_amount: nil, total_tax_amounts: nil, total_taxes: nil, transaction_id: nil, payment_provider: nil, test_mode: nil, request_options: {})
|
|
364
364
|
#
|
|
365
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
365
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
366
366
|
#
|
|
367
367
|
# @param id [String] Path param: GrowSurf program ID.
|
|
368
368
|
#
|
|
@@ -437,11 +437,12 @@ module GrowsurfRuby
|
|
|
437
437
|
# and reverses or adjusts the referrer's commission. The inverse of Record
|
|
438
438
|
# Affiliate Transaction. Identify the original transaction with the same
|
|
439
439
|
# identifier(s) you sent when recording it. Commissions already paid out to the
|
|
440
|
-
# affiliate are not clawed back
|
|
440
|
+
# affiliate are not clawed back. The amendment still updates the sale revenue used
|
|
441
|
+
# in program reporting; full refunds and chargebacks also update tax reporting.
|
|
441
442
|
#
|
|
442
|
-
# @overload refund_transaction(participant_id_or_email, id:, amendment_type: nil, amount: nil, amount_refunded: nil, charge_id: nil, currency: nil, description: nil, external_id: nil, invoice_id: nil, order_id: nil, payment_id: nil, payment_intent_id: nil, refund_amount: nil, refund_id: nil, refund_status: nil, transaction_id: nil, request_options: {})
|
|
443
|
+
# @overload refund_transaction(participant_id_or_email, id:, amendment_type: nil, amount: nil, amount_refunded: nil, charge_id: nil, currency: nil, description: nil, external_id: nil, invoice_id: nil, order_id: nil, payment_id: nil, payment_intent_id: nil, refund_amount: nil, refund_id: nil, refund_status: nil, transaction_id: nil, payment_provider: nil, test_mode: nil, request_options: {})
|
|
443
444
|
#
|
|
444
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
445
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
445
446
|
#
|
|
446
447
|
# @param id [String] Path param: GrowSurf program ID.
|
|
447
448
|
#
|
|
@@ -501,7 +502,7 @@ module GrowsurfRuby
|
|
|
501
502
|
#
|
|
502
503
|
# @overload send_invites(participant_id_or_email, id:, email_addresses:, message_text:, subject_text:, request_options: {})
|
|
503
504
|
#
|
|
504
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
505
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
505
506
|
#
|
|
506
507
|
# @param id [String] Path param: GrowSurf program ID.
|
|
507
508
|
#
|
|
@@ -543,7 +544,7 @@ module GrowsurfRuby
|
|
|
543
544
|
#
|
|
544
545
|
# @overload trigger_referral(participant_id_or_email, id:, delay_in_days: nil, request_options: {})
|
|
545
546
|
#
|
|
546
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
547
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
547
548
|
#
|
|
548
549
|
# @param id [String] Path param: GrowSurf program ID.
|
|
549
550
|
#
|
|
@@ -577,7 +578,7 @@ module GrowsurfRuby
|
|
|
577
578
|
#
|
|
578
579
|
# @overload cancel_delayed_referral(participant_id_or_email, id:, request_options: {})
|
|
579
580
|
#
|
|
580
|
-
# @param participant_id_or_email [String] GrowSurf participant ID or
|
|
581
|
+
# @param participant_id_or_email [String] GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
581
582
|
#
|
|
582
583
|
# @param id [String] GrowSurf program ID.
|
|
583
584
|
#
|
|
@@ -611,7 +612,7 @@ module GrowsurfRuby
|
|
|
611
612
|
#
|
|
612
613
|
# @overload email(participant_id_or_email, id:, body: nil, email_type: nil, preheader: nil, subject: nil, request_options: {})
|
|
613
614
|
#
|
|
614
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
615
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
615
616
|
#
|
|
616
617
|
# @param id [String] Path param: GrowSurf program ID.
|
|
617
618
|
#
|
|
@@ -648,7 +649,7 @@ module GrowsurfRuby
|
|
|
648
649
|
#
|
|
649
650
|
# @overload list_activity_logs(participant_id_or_email, id:, limit: nil, offset: nil, request_options: {})
|
|
650
651
|
#
|
|
651
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
652
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
652
653
|
#
|
|
653
654
|
# @param id [String] Path param: GrowSurf program ID.
|
|
654
655
|
#
|
|
@@ -686,14 +687,14 @@ module GrowsurfRuby
|
|
|
686
687
|
# commission, and payout metrics for affiliate programs). Pass `include=email`
|
|
687
688
|
# for `sent` (accepted for delivery), `delivered`, `opened`, `clicked`,
|
|
688
689
|
# `bounced`, and `spamComplaints` metrics attributed to this participant,
|
|
689
|
-
# including invitations they sent.
|
|
690
|
-
#
|
|
691
|
-
#
|
|
692
|
-
#
|
|
690
|
+
# including invitations they sent. Add `activation` for the cohort anchor and
|
|
691
|
+
# covered first milestones. Use `include=activation,series` to add covered portal
|
|
692
|
+
# views and share actions to each series bucket. Unknown history stays `null` with
|
|
693
|
+
# an explicit coverage state.
|
|
693
694
|
#
|
|
694
695
|
# @overload retrieve_analytics(participant_id_or_email, id:, days: nil, end_date: nil, include: nil, interval: nil, start_date: nil, request_options: {})
|
|
695
696
|
#
|
|
696
|
-
# @param participant_id_or_email [String] GrowSurf participant ID or
|
|
697
|
+
# @param participant_id_or_email [String] GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
697
698
|
#
|
|
698
699
|
# @param id [String] GrowSurf program ID.
|
|
699
700
|
#
|
|
@@ -737,7 +738,7 @@ module GrowsurfRuby
|
|
|
737
738
|
#
|
|
738
739
|
# @overload get_payout_destination(participant_id_or_email, id:, request_options: {})
|
|
739
740
|
#
|
|
740
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
741
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
741
742
|
#
|
|
742
743
|
# @param id [String] Path param: GrowSurf program ID.
|
|
743
744
|
#
|
|
@@ -767,7 +768,7 @@ module GrowsurfRuby
|
|
|
767
768
|
#
|
|
768
769
|
# @overload request_payout_destination_confirmation(participant_id_or_email, id:, provider:, request_options: {})
|
|
769
770
|
#
|
|
770
|
-
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or
|
|
771
|
+
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
771
772
|
#
|
|
772
773
|
# @param id [String] Path param: GrowSurf program ID.
|
|
773
774
|
#
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Resources
|
|
5
|
+
class Campaign
|
|
6
|
+
# Program Resource management and secure FILE upload operations.
|
|
7
|
+
class ProgramResources
|
|
8
|
+
def list(id, params = {})
|
|
9
|
+
@client.request(
|
|
10
|
+
method: :get,
|
|
11
|
+
path: ["campaign/%1$s/resources", id],
|
|
12
|
+
model: GrowsurfRuby::Campaign::ProgramResourceListResponse,
|
|
13
|
+
options: params[:request_options]
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def create(id, params)
|
|
18
|
+
parsed, options = GrowsurfRuby::Campaign::ProgramResourceCreateParams.dump_request(params)
|
|
19
|
+
validate_write!(parsed, creating: true)
|
|
20
|
+
@client.request(
|
|
21
|
+
method: :post,
|
|
22
|
+
path: ["campaign/%1$s/resources", id],
|
|
23
|
+
body: parsed,
|
|
24
|
+
model: GrowsurfRuby::Campaign::ProgramResource,
|
|
25
|
+
options: options
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def update(resource_id, params)
|
|
30
|
+
parsed, options = GrowsurfRuby::Campaign::ProgramResourceUpdateParams.dump_request(params)
|
|
31
|
+
id = parsed.delete(:id) { raise ArgumentError.new("missing required path argument id") }
|
|
32
|
+
validate_write!(parsed, creating: false)
|
|
33
|
+
@client.request(
|
|
34
|
+
method: :patch,
|
|
35
|
+
path: ["campaign/%1$s/resources/%2$s", id, resource_id],
|
|
36
|
+
body: parsed,
|
|
37
|
+
model: GrowsurfRuby::Campaign::ProgramResource,
|
|
38
|
+
options: options
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def delete(resource_id, params)
|
|
43
|
+
parsed, options = GrowsurfRuby::Campaign::ProgramResourceDeleteParams.dump_request(params)
|
|
44
|
+
id = parsed.delete(:id) { raise ArgumentError.new("missing required path argument id") }
|
|
45
|
+
@client.request(
|
|
46
|
+
method: :delete,
|
|
47
|
+
path: ["campaign/%1$s/resources/%2$s", id, resource_id],
|
|
48
|
+
model: GrowsurfRuby::Campaign::DeleteProgramResourceResponse,
|
|
49
|
+
options: options
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def create_upload_ticket(id, params)
|
|
54
|
+
parsed, options = GrowsurfRuby::Campaign::ProgramResourceUploadTicketParams.dump_request(params)
|
|
55
|
+
file_name = parsed[:fileName]
|
|
56
|
+
unless file_name.is_a?(String) && file_name.length.between?(1, 120)
|
|
57
|
+
raise ArgumentError.new("Program Resource file_name must contain 1 through 120 characters")
|
|
58
|
+
end
|
|
59
|
+
@client.request(
|
|
60
|
+
method: :post,
|
|
61
|
+
path: ["campaign/%1$s/resource-upload-tickets", id],
|
|
62
|
+
body: parsed,
|
|
63
|
+
model: GrowsurfRuby::Campaign::ProgramResourceUploadTicket,
|
|
64
|
+
options: options
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# @api private
|
|
69
|
+
def initialize(client:)
|
|
70
|
+
@client = client
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
private
|
|
74
|
+
|
|
75
|
+
# Rejects Resource field combinations excluded by the public REST contract.
|
|
76
|
+
def validate_write!(params, creating:)
|
|
77
|
+
if !creating && params.empty?
|
|
78
|
+
raise ArgumentError.new("Program Resource update requires at least one field")
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
position = params[:position]
|
|
82
|
+
if params.key?(:position) && (!position.is_a?(Integer) || !position.between?(0, 99))
|
|
83
|
+
raise ArgumentError.new("Program Resource position must be an integer from 0 through 99")
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
has_upload_ticket = params.key?(:uploadTicket)
|
|
87
|
+
has_upload_result = params.key?(:uploadResult)
|
|
88
|
+
if has_upload_ticket != has_upload_result
|
|
89
|
+
raise ArgumentError.new("upload_ticket and upload_result must be supplied together")
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
supplied_types = []
|
|
93
|
+
supplied_types << :LINK if params.key?(:url)
|
|
94
|
+
supplied_types << :TEXT if params.key?(:text)
|
|
95
|
+
supplied_types << :FILE if has_upload_ticket
|
|
96
|
+
raise ArgumentError.new("send content fields for only one Program Resource type") if supplied_types.length > 1
|
|
97
|
+
|
|
98
|
+
type = params[:type]
|
|
99
|
+
if supplied_types.any? && !type.nil? && supplied_types.first != type
|
|
100
|
+
raise ArgumentError.new("content fields must match the selected Program Resource type")
|
|
101
|
+
end
|
|
102
|
+
if !creating && !type.nil? && supplied_types != [type]
|
|
103
|
+
raise ArgumentError.new("changing a Program Resource type requires its replacement content")
|
|
104
|
+
end
|
|
105
|
+
return unless creating && (supplied_types.empty? || supplied_types.first != type)
|
|
106
|
+
|
|
107
|
+
raise ArgumentError.new("create requires content fields for the selected Program Resource type")
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
@@ -28,7 +28,8 @@ module GrowsurfRuby
|
|
|
28
28
|
# The reward type must be compatible with the program type (affiliate programs
|
|
29
29
|
# support only `AFFILIATE` rewards; referral programs support all other types).
|
|
30
30
|
# Enabling an active reward of a type automatically enables that reward type on
|
|
31
|
-
# the program.
|
|
31
|
+
# the program. For an affiliate reward, `commissionStructure.event: LEAD`
|
|
32
|
+
# requires a `FIXED` commission with a positive `amount`.
|
|
32
33
|
#
|
|
33
34
|
# @overload create(id, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, title: nil, value: nil, request_options: {})
|
|
34
35
|
#
|
|
@@ -36,7 +37,7 @@ module GrowsurfRuby
|
|
|
36
37
|
#
|
|
37
38
|
# @param type [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::Type] Body param: The reward type. Immutable after creation.
|
|
38
39
|
#
|
|
39
|
-
# @param commission_structure [GrowsurfRuby::Models::CommissionStructure] Body param
|
|
40
|
+
# @param commission_structure [GrowsurfRuby::Models::CommissionStructure] Body param: The affiliate commission structure. Required when creating an `AFFILIATE` reward. A `FIXED` commission requires `amount`; a `PERCENT` commission requires `percent`.
|
|
40
41
|
#
|
|
41
42
|
# @param conversions_required [Integer] Body param
|
|
42
43
|
#
|
|
@@ -98,7 +99,8 @@ module GrowsurfRuby
|
|
|
98
99
|
# immutable and cannot be changed. When the update replaces `metadata`, renamed
|
|
99
100
|
# keys automatically rewrite any `{{campaignReward[…]}}` references in campaign
|
|
100
101
|
# copy; removing a key that campaign copy still references returns a `409` listing
|
|
101
|
-
# the referencing fields.
|
|
102
|
+
# the referencing fields. For an affiliate reward, `commissionStructure.event:
|
|
103
|
+
# LEAD` requires a `FIXED` commission with a positive `amount`.
|
|
102
104
|
#
|
|
103
105
|
# @overload update(campaign_reward_id, id:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, title: nil, value: nil, request_options: {})
|
|
104
106
|
#
|
|
@@ -106,7 +108,7 @@ module GrowsurfRuby
|
|
|
106
108
|
#
|
|
107
109
|
# @param id [String] Path param: GrowSurf program ID.
|
|
108
110
|
#
|
|
109
|
-
# @param commission_structure [GrowsurfRuby::Models::CommissionStructure] Body param
|
|
111
|
+
# @param commission_structure [GrowsurfRuby::Models::CommissionStructure] Body param: The affiliate commission structure. A `FIXED` commission requires `amount`; a `PERCENT` commission requires `percent`.
|
|
110
112
|
#
|
|
111
113
|
# @param conversions_required [Integer] Body param
|
|
112
114
|
#
|
|
@@ -18,6 +18,10 @@ module GrowsurfRuby
|
|
|
18
18
|
# @return [GrowsurfRuby::Resources::Campaign::Rewards]
|
|
19
19
|
attr_reader :rewards
|
|
20
20
|
|
|
21
|
+
# Program Resource management and secure FILE upload operations.
|
|
22
|
+
# @return [GrowsurfRuby::Resources::Campaign::ProgramResources]
|
|
23
|
+
attr_reader :resources
|
|
24
|
+
|
|
21
25
|
# Program Editor "Design" tab configuration operations.
|
|
22
26
|
# @return [GrowsurfRuby::Resources::Campaign::Design]
|
|
23
27
|
attr_reader :design
|
|
@@ -34,6 +38,10 @@ module GrowsurfRuby
|
|
|
34
38
|
# @return [GrowsurfRuby::Resources::Campaign::Installation]
|
|
35
39
|
attr_reader :installation
|
|
36
40
|
|
|
41
|
+
# Integration status operations.
|
|
42
|
+
# @return [GrowsurfRuby::Resources::Campaign::Integrations]
|
|
43
|
+
attr_reader :integrations
|
|
44
|
+
|
|
37
45
|
# Program webhook configuration operations.
|
|
38
46
|
# @return [GrowsurfRuby::Resources::Campaign::Webhooks]
|
|
39
47
|
attr_reader :webhooks
|
|
@@ -79,7 +87,7 @@ module GrowsurfRuby
|
|
|
79
87
|
# Creates a new program, plus any optional campaign rewards. The new program is
|
|
80
88
|
# created in `DRAFT` status and owned by the API key's bound team.
|
|
81
89
|
#
|
|
82
|
-
# @overload create(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil, name: nil, rewards: nil, request_options: {})
|
|
90
|
+
# @overload create(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil, goal: nil, name: nil, rewards: nil, request_options: {})
|
|
83
91
|
#
|
|
84
92
|
# @param type [Symbol, GrowsurfRuby::Models::CampaignCreateParams::Type] The program type. Immutable after creation.
|
|
85
93
|
#
|
|
@@ -89,6 +97,8 @@ module GrowsurfRuby
|
|
|
89
97
|
#
|
|
90
98
|
# @param currency_iso [String] ISO 4217 currency code. Defaults to USD. Chosen when the program is created and immutable afterward — it cannot be changed on update.
|
|
91
99
|
#
|
|
100
|
+
# @param goal [Symbol, GrowsurfRuby::Models::CampaignCreateParams::Goal] What the program is for, which seeds share settings that suit that audience. Programs selling to businesses start with the LinkedIn share button visible; consumer, financial, education, insurance, newsletter, and waitlist programs start with it hidden. Set only when the program is created.
|
|
101
|
+
#
|
|
92
102
|
# @param name [String] The program name. Defaults to a generated friendly label plus the creation date.
|
|
93
103
|
#
|
|
94
104
|
# @param rewards [Array<GrowsurfRuby::Models::Campaign::RewardCreateParams>] Optional inline rewards to create with the program.
|
|
@@ -531,13 +541,11 @@ module GrowsurfRuby
|
|
|
531
541
|
#
|
|
532
542
|
# Retrieves analytics for a program. Pass `interval` to also get a time-series
|
|
533
543
|
# (`series`) alongside the totals, and `include` to add previous-period totals,
|
|
534
|
-
# status breakdowns, derived rates,
|
|
535
|
-
#
|
|
536
|
-
#
|
|
537
|
-
# ratios from `0` to `1`, and `isPartial` identifies windows that begin before
|
|
538
|
-
# complete coverage.
|
|
544
|
+
# status breakdowns, derived rates, email performance, or participant engagement.
|
|
545
|
+
# Add `engagement` for covered activity totals, comparisons, series, and breakdowns.
|
|
546
|
+
# Unknown coverage returns explicit unavailable states rather than zeroes.
|
|
539
547
|
#
|
|
540
|
-
# @overload retrieve_analytics(id, days: nil, end_date: nil, include: nil, interval: nil, start_date: nil, request_options: {})
|
|
548
|
+
# @overload retrieve_analytics(id, days: nil, end_date: nil, include: nil, interval: nil, platform: nil, start_date: nil, timezone: nil, request_options: {})
|
|
541
549
|
#
|
|
542
550
|
# @param id [String] GrowSurf program ID.
|
|
543
551
|
#
|
|
@@ -549,8 +557,12 @@ module GrowsurfRuby
|
|
|
549
557
|
#
|
|
550
558
|
# @param interval [Symbol, GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams::Interval] When set to `day`, `week`, or `month`, the response also includes a `series` array
|
|
551
559
|
#
|
|
560
|
+
# @param platform [Symbol, GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams::Platform] Limits engagement events to one client platform.
|
|
561
|
+
#
|
|
552
562
|
# @param start_date [Integer] Start date of the analytics timeframe as a Unix timestamp in milliseconds. Requi
|
|
553
563
|
#
|
|
564
|
+
# @param timezone [String] IANA timezone used for engagement interval boundaries and distinct-day calculations.
|
|
565
|
+
#
|
|
554
566
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
555
567
|
#
|
|
556
568
|
# @return [GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse]
|
|
@@ -568,6 +580,38 @@ module GrowsurfRuby
|
|
|
568
580
|
)
|
|
569
581
|
end
|
|
570
582
|
|
|
583
|
+
# Retrieves activation cohorts for a program. Each cohort follows eligible
|
|
584
|
+
# participants through portal views, sharing, referral visits, leads, and credited
|
|
585
|
+
# referrals. Coverage states distinguish unknown values from zeroes.
|
|
586
|
+
#
|
|
587
|
+
# @overload retrieve_activation_analytics(id, cohort_from: nil, cohort_to: nil, cohort_interval: nil, observation_window_days: nil, timezone: nil, request_options: {})
|
|
588
|
+
#
|
|
589
|
+
# @param id [String] GrowSurf program ID.
|
|
590
|
+
# @param cohort_from [Integer] Inclusive cohort enrollment start, as a Unix timestamp in milliseconds.
|
|
591
|
+
# @param cohort_to [Integer] Exclusive cohort enrollment end, as a Unix timestamp in milliseconds.
|
|
592
|
+
# @param cohort_interval [Symbol, GrowsurfRuby::Models::CampaignRetrieveActivationAnalyticsParams::CohortInterval] Cohort bucket size. Defaults to `day`.
|
|
593
|
+
# @param observation_window_days [Integer] Days after enrollment allowed for each participant to reach a stage. Use `7` or `30`.
|
|
594
|
+
# @param timezone [String] IANA timezone used for cohort bounds. Defaults to `UTC`.
|
|
595
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
596
|
+
# @return [GrowsurfRuby::Models::CampaignActivationAnalyticsResponse]
|
|
597
|
+
# @see GrowsurfRuby::Models::CampaignRetrieveActivationAnalyticsParams
|
|
598
|
+
def retrieve_activation_analytics(id, params = {})
|
|
599
|
+
parsed, options = GrowsurfRuby::CampaignRetrieveActivationAnalyticsParams.dump_request(params)
|
|
600
|
+
query = GrowsurfRuby::Internal::Util.encode_query_params(parsed)
|
|
601
|
+
@client.request(
|
|
602
|
+
method: :get,
|
|
603
|
+
path: ["campaign/%1$s/analytics/activation", id],
|
|
604
|
+
query: query.transform_keys(
|
|
605
|
+
cohort_from: "cohortFrom",
|
|
606
|
+
cohort_to: "cohortTo",
|
|
607
|
+
cohort_interval: "cohortInterval",
|
|
608
|
+
observation_window_days: "observationWindowDays"
|
|
609
|
+
),
|
|
610
|
+
model: GrowsurfRuby::Models::CampaignActivationAnalyticsResponse,
|
|
611
|
+
options: options
|
|
612
|
+
)
|
|
613
|
+
end
|
|
614
|
+
|
|
571
615
|
# Some parameter documentations has been truncated, see
|
|
572
616
|
# {GrowsurfRuby::Models::CampaignReviewAffiliateApplicationParams} for more
|
|
573
617
|
# details.
|
|
@@ -653,10 +697,12 @@ module GrowsurfRuby
|
|
|
653
697
|
@reward = GrowsurfRuby::Resources::Campaign::Reward.new(client: client)
|
|
654
698
|
@commission = GrowsurfRuby::Resources::Campaign::Commission.new(client: client)
|
|
655
699
|
@rewards = GrowsurfRuby::Resources::Campaign::Rewards.new(client: client)
|
|
700
|
+
@resources = GrowsurfRuby::Resources::Campaign::ProgramResources.new(client: client)
|
|
656
701
|
@design = GrowsurfRuby::Resources::Campaign::Design.new(client: client)
|
|
657
702
|
@emails = GrowsurfRuby::Resources::Campaign::Emails.new(client: client)
|
|
658
703
|
@options = GrowsurfRuby::Resources::Campaign::Options.new(client: client)
|
|
659
704
|
@installation = GrowsurfRuby::Resources::Campaign::Installation.new(client: client)
|
|
705
|
+
@integrations = GrowsurfRuby::Resources::Campaign::Integrations.new(client: client)
|
|
660
706
|
@webhooks = GrowsurfRuby::Resources::Campaign::Webhooks.new(client: client)
|
|
661
707
|
end
|
|
662
708
|
end
|
|
@@ -87,11 +87,13 @@ module GrowsurfRuby
|
|
|
87
87
|
)
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
# Resends the email-verification message to the
|
|
91
|
-
#
|
|
92
|
-
#
|
|
93
|
-
#
|
|
94
|
-
#
|
|
90
|
+
# Resends the email-verification message to the owner of the account the API key
|
|
91
|
+
# belongs to. This is the recovery path for a `403` with error code
|
|
92
|
+
# `EMAIL_NOT_VERIFIED_ERROR`, so it stays callable with any GrowSurf API key while the
|
|
93
|
+
# rest of the API is locked. The response never reveals the owner's email address. A
|
|
94
|
+
# `200` with `status: SENT` is returned only when an email was actually dispatched.
|
|
95
|
+
# Returns `400` if the email is already verified, and `429` if a verification email was
|
|
96
|
+
# sent too recently — wait a moment, then retry.
|
|
95
97
|
#
|
|
96
98
|
# @overload resend_owner_verification_email(request_options: {})
|
|
97
99
|
#
|
data/lib/growsurf_ruby.rb
CHANGED
|
@@ -52,6 +52,10 @@ require_relative "growsurf_ruby/errors"
|
|
|
52
52
|
require_relative "growsurf_ruby/internal/transport/base_client"
|
|
53
53
|
require_relative "growsurf_ruby/internal/transport/pooled_net_requester"
|
|
54
54
|
require_relative "growsurf_ruby/client"
|
|
55
|
+
require_relative "growsurf_ruby/models/analytics_availability"
|
|
56
|
+
require_relative "growsurf_ruby/models/analytics_unavailable_reason"
|
|
57
|
+
require_relative "growsurf_ruby/models/campaign_activation_analytics_response"
|
|
58
|
+
require_relative "growsurf_ruby/models/campaign_engagement_analytics"
|
|
55
59
|
require_relative "growsurf_ruby/models/campaign/create"
|
|
56
60
|
require_relative "growsurf_ruby/models/campaign/participant"
|
|
57
61
|
require_relative "growsurf_ruby/models/campaign/campaign_reward_list_response"
|
|
@@ -63,6 +67,7 @@ require_relative "growsurf_ruby/models/campaign/delete_reward_response"
|
|
|
63
67
|
require_relative "growsurf_ruby/models/campaign/fraud_risk_level"
|
|
64
68
|
require_relative "growsurf_ruby/models/campaign/participant_activity_logs_response"
|
|
65
69
|
require_relative "growsurf_ruby/models/campaign/participant_add_params"
|
|
70
|
+
require_relative "growsurf_ruby/models/campaign/participant_activation_analytics"
|
|
66
71
|
require_relative "growsurf_ruby/models/email_analytics"
|
|
67
72
|
require_relative "growsurf_ruby/models/campaign/participant_analytics_response"
|
|
68
73
|
require_relative "growsurf_ruby/models/campaign/participant_bulk_delete_params"
|
|
@@ -95,6 +100,15 @@ require_relative "growsurf_ruby/models/campaign/participant_send_invites_respons
|
|
|
95
100
|
require_relative "growsurf_ruby/models/campaign/participant_trigger_referral_params"
|
|
96
101
|
require_relative "growsurf_ruby/models/campaign/participant_trigger_referral_response"
|
|
97
102
|
require_relative "growsurf_ruby/models/campaign/participant_update_params"
|
|
103
|
+
require_relative "growsurf_ruby/models/campaign/program_resource"
|
|
104
|
+
require_relative "growsurf_ruby/models/campaign/program_resource_upload_result"
|
|
105
|
+
require_relative "growsurf_ruby/models/campaign/program_resource_create_params"
|
|
106
|
+
require_relative "growsurf_ruby/models/campaign/program_resource_delete_params"
|
|
107
|
+
require_relative "growsurf_ruby/models/campaign/program_resource_list_response"
|
|
108
|
+
require_relative "growsurf_ruby/models/campaign/program_resource_update_params"
|
|
109
|
+
require_relative "growsurf_ruby/models/campaign/program_resource_upload_ticket"
|
|
110
|
+
require_relative "growsurf_ruby/models/campaign/program_resource_upload_ticket_params"
|
|
111
|
+
require_relative "growsurf_ruby/models/campaign/delete_program_resource_response"
|
|
98
112
|
require_relative "growsurf_ruby/models/campaign/referral_source"
|
|
99
113
|
require_relative "growsurf_ruby/models/campaign/referral_status"
|
|
100
114
|
require_relative "growsurf_ruby/models/campaign/reward"
|
|
@@ -106,6 +120,8 @@ require_relative "growsurf_ruby/models/campaign/reward_delete_response"
|
|
|
106
120
|
require_relative "growsurf_ruby/models/campaign/reward_fulfill_params"
|
|
107
121
|
require_relative "growsurf_ruby/models/campaign/reward_fulfill_response"
|
|
108
122
|
require_relative "growsurf_ruby/models/campaign/reward_update_params"
|
|
123
|
+
require_relative "growsurf_ruby/models/campaign/integration"
|
|
124
|
+
require_relative "growsurf_ruby/models/campaign/integration_list_response"
|
|
109
125
|
require_relative "growsurf_ruby/models/campaign/webhook"
|
|
110
126
|
require_relative "growsurf_ruby/models/campaign/webhook_create_params"
|
|
111
127
|
require_relative "growsurf_ruby/models/campaign/webhook_delete_params"
|
|
@@ -141,6 +157,7 @@ require_relative "growsurf_ruby/models/campaign_list_referrals_params"
|
|
|
141
157
|
require_relative "growsurf_ruby/models/campaign_list_response"
|
|
142
158
|
require_relative "growsurf_ruby/models/campaign_resend_affiliate_invite_params"
|
|
143
159
|
require_relative "growsurf_ruby/models/campaign_retrieve_affiliate_application_params"
|
|
160
|
+
require_relative "growsurf_ruby/models/campaign_retrieve_activation_analytics_params"
|
|
144
161
|
require_relative "growsurf_ruby/models/campaign_retrieve_analytics_params"
|
|
145
162
|
require_relative "growsurf_ruby/models/campaign_retrieve_analytics_response"
|
|
146
163
|
require_relative "growsurf_ruby/models/campaign_retrieve_params"
|
|
@@ -165,4 +182,6 @@ require_relative "growsurf_ruby/resources/campaign/options"
|
|
|
165
182
|
require_relative "growsurf_ruby/resources/campaign/participant"
|
|
166
183
|
require_relative "growsurf_ruby/resources/campaign/reward"
|
|
167
184
|
require_relative "growsurf_ruby/resources/campaign/rewards"
|
|
185
|
+
require_relative "growsurf_ruby/resources/campaign/program_resources"
|
|
186
|
+
require_relative "growsurf_ruby/resources/campaign/integrations"
|
|
168
187
|
require_relative "growsurf_ruby/resources/campaign/webhooks"
|
|
@@ -264,6 +264,16 @@ module GrowsurfRuby
|
|
|
264
264
|
def deep_to_h
|
|
265
265
|
end
|
|
266
266
|
|
|
267
|
+
sig { returns(T::Hash[String, String]) }
|
|
268
|
+
attr_reader :response_headers
|
|
269
|
+
|
|
270
|
+
# @api private
|
|
271
|
+
sig do
|
|
272
|
+
params(headers: T::Hash[String, String]).returns(T.self_type)
|
|
273
|
+
end
|
|
274
|
+
def attach_response_headers(headers)
|
|
275
|
+
end
|
|
276
|
+
|
|
267
277
|
sig do
|
|
268
278
|
params(keys: T.nilable(T::Array[Symbol])).returns(
|
|
269
279
|
GrowsurfRuby::Internal::AnyHash
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module AnalyticsAvailability
|
|
6
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
7
|
+
|
|
8
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
9
|
+
|
|
10
|
+
AVAILABLE = T.let(:AVAILABLE, Symbol)
|
|
11
|
+
PARTIAL = T.let(:PARTIAL, Symbol)
|
|
12
|
+
UNAVAILABLE = T.let(:UNAVAILABLE, Symbol)
|
|
13
|
+
|
|
14
|
+
sig { override.returns(T::Array[Symbol]) }
|
|
15
|
+
def self.values
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module AnalyticsUnavailableReason
|
|
6
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
7
|
+
|
|
8
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
9
|
+
|
|
10
|
+
COVERAGE_UNAVAILABLE = T.let(:COVERAGE_UNAVAILABLE, Symbol)
|
|
11
|
+
PRE_COVERAGE = T.let(:PRE_COVERAGE, Symbol)
|
|
12
|
+
PARTIAL_COVERAGE = T.let(:PARTIAL_COVERAGE, Symbol)
|
|
13
|
+
INSUFFICIENT_COVERAGE = T.let(:INSUFFICIENT_COVERAGE, Symbol)
|
|
14
|
+
EMPTY_DENOMINATOR = T.let(:EMPTY_DENOMINATOR, Symbol)
|
|
15
|
+
QUERY_LIMIT_EXCEEDED = T.let(:QUERY_LIMIT_EXCEEDED, Symbol)
|
|
16
|
+
PARTICIPANT_NOT_ELIGIBLE = T.let(:PARTICIPANT_NOT_ELIGIBLE, Symbol)
|
|
17
|
+
|
|
18
|
+
sig { override.returns(T::Array[Symbol]) }
|
|
19
|
+
def self.values
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class DeleteProgramResourceResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
DeleteProgramResourceResponse,
|
|
11
|
+
GrowsurfRuby::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
sig { returns(T::Boolean) }
|
|
19
|
+
attr_accessor :success
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(id: String, success: T::Boolean).returns(T.attached_class)
|
|
23
|
+
end
|
|
24
|
+
def self.new(id:, success:)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
sig { override.returns({ id: String, success: T::Boolean }) }
|
|
28
|
+
def to_hash
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|