Class: GrowsurfRuby::Resources::Campaign

Inherits:
Object
  • Object
show all
Defined in:
lib/growsurf_ruby/resources/campaign.rb,
lib/growsurf_ruby/resources/campaign/design.rb,
lib/growsurf_ruby/resources/campaign/emails.rb,
lib/growsurf_ruby/resources/campaign/reward.rb,
lib/growsurf_ruby/resources/campaign/options.rb,
lib/growsurf_ruby/resources/campaign/rewards.rb,
lib/growsurf_ruby/resources/campaign/webhooks.rb,
lib/growsurf_ruby/resources/campaign/commission.rb,
lib/growsurf_ruby/resources/campaign/participant.rb,
lib/growsurf_ruby/resources/campaign/installation.rb,
sig/growsurf_ruby/resources/campaign.rbs,
sig/growsurf_ruby/resources/campaign/design.rbs,
sig/growsurf_ruby/resources/campaign/emails.rbs,
sig/growsurf_ruby/resources/campaign/reward.rbs,
sig/growsurf_ruby/resources/campaign/options.rbs,
sig/growsurf_ruby/resources/campaign/rewards.rbs,
sig/growsurf_ruby/resources/campaign/webhooks.rbs,
sig/growsurf_ruby/resources/campaign/commission.rbs,
sig/growsurf_ruby/resources/campaign/participant.rbs,
sig/growsurf_ruby/resources/campaign/installation.rbs

Defined Under Namespace

Classes: Commission, Design, Emails, Installation, Options, Participant, Reward, Rewards, Webhooks

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Campaign

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Campaign.

Parameters:



650
651
652
653
654
655
656
657
658
659
660
661
# File 'lib/growsurf_ruby/resources/campaign.rb', line 650

def initialize(client:)
  @client = client
  @participant = GrowsurfRuby::Resources::Campaign::Participant.new(client: client)
  @reward = GrowsurfRuby::Resources::Campaign::Reward.new(client: client)
  @commission = GrowsurfRuby::Resources::Campaign::Commission.new(client: client)
  @rewards = GrowsurfRuby::Resources::Campaign::Rewards.new(client: client)
  @design = GrowsurfRuby::Resources::Campaign::Design.new(client: client)
  @emails = GrowsurfRuby::Resources::Campaign::Emails.new(client: client)
  @options = GrowsurfRuby::Resources::Campaign::Options.new(client: client)
  @installation = GrowsurfRuby::Resources::Campaign::Installation.new(client: client)
  @webhooks = GrowsurfRuby::Resources::Campaign::Webhooks.new(client: client)
end

Instance Attribute Details

#commissionGrowsurfRuby::Resources::Campaign::Commission (readonly)

Affiliate transaction, commission, and payout operations.



15
16
17
# File 'lib/growsurf_ruby/resources/campaign.rb', line 15

def commission
  @commission
end

#designGrowsurfRuby::Resources::Campaign::Design (readonly)

Program Editor "Design" tab configuration operations.



23
24
25
# File 'lib/growsurf_ruby/resources/campaign.rb', line 23

def design
  @design
end

#emailsGrowsurfRuby::Resources::Campaign::Emails (readonly)

Program Editor "Emails" tab configuration operations.



27
28
29
# File 'lib/growsurf_ruby/resources/campaign.rb', line 27

def emails
  @emails
end

#installationGrowsurfRuby::Resources::Campaign::Installation (readonly)

Program Editor "Installation" tab configuration operations.



35
36
37
# File 'lib/growsurf_ruby/resources/campaign.rb', line 35

def installation
  @installation
end

#optionsGrowsurfRuby::Resources::Campaign::Options (readonly)

Program Editor "Options" tab configuration operations.



31
32
33
# File 'lib/growsurf_ruby/resources/campaign.rb', line 31

def options
  @options
end

#participantGrowsurfRuby::Resources::Campaign::Participant (readonly)



7
8
9
# File 'lib/growsurf_ruby/resources/campaign.rb', line 7

def participant
  @participant
end

#rewardGrowsurfRuby::Resources::Campaign::Reward (readonly)

Participant reward retrieval and manual reward operations.



11
12
13
# File 'lib/growsurf_ruby/resources/campaign.rb', line 11

def reward
  @reward
end

#rewardsGrowsurfRuby::Resources::Campaign::Rewards (readonly)

Campaign reward configuration operations.



19
20
21
# File 'lib/growsurf_ruby/resources/campaign.rb', line 19

def rewards
  @rewards
end

#webhooksGrowsurfRuby::Resources::Campaign::Webhooks (readonly)

Program webhook configuration operations.



39
40
41
# File 'lib/growsurf_ruby/resources/campaign.rb', line 39

def webhooks
  @webhooks
end

Instance Method Details

#clone(id, request_options: {}) ⇒ GrowsurfRuby::Models::CampaignAPI

Clones an existing program into a new DRAFT program. Integrations and credentials are not copied; active rewards are cloned.

Parameters:

Returns:



156
157
158
159
160
161
162
163
# File 'lib/growsurf_ruby/resources/campaign.rb', line 156

def clone(id, params = {})
  @client.request(
    method: :post,
    path: ["campaign/%1$s/clone", id],
    model: GrowsurfRuby::CampaignAPI,
    options: params[:request_options]
  )
end

#create(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil, name: nil, rewards: nil, request_options: {}) ⇒ GrowsurfRuby::Models::CampaignAPI

Creates a new program, plus any optional campaign rewards. The new program is created in DRAFT status and owned by the API key's bound team.

Parameters:

Returns:

See Also:



101
102
103
104
105
106
107
108
109
110
# File 'lib/growsurf_ruby/resources/campaign.rb', line 101

def create(params)
  parsed, options = GrowsurfRuby::CampaignCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "campaigns",
    body: parsed,
    model: GrowsurfRuby::CampaignAPI,
    options: options
  )
end

#create_affiliate_invite(id, email:, first_name: nil, last_name: nil, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateInvite

Invites someone to join the affiliate program. GrowSurf emails them a single-use accept link; accepting it enrolls them as an approved affiliate without going through the public application. One active invite can exist per email address.

Parameters:

  • id (String)

    GrowSurf program ID.

  • email (String)

    Valid email address to invite. Maximum 255 characters.

  • first_name (String)

    Invitee first name, used in the invite email. Maximum 255 characters.

  • last_name (String)

    Invitee last name. Maximum 255 characters.

  • request_options (GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



184
185
186
187
188
189
190
191
192
193
# File 'lib/growsurf_ruby/resources/campaign.rb', line 184

def create_affiliate_invite(id, params)
  parsed, options = GrowsurfRuby::CampaignCreateAffiliateInviteParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["campaign/%1$s/affiliate-invites", id],
    body: parsed,
    model: GrowsurfRuby::AffiliateInvite,
    options: options
  )
end

#create_mobile_participant_token(id, email:, fingerprint: nil, first_name: nil, ip_address: nil, last_name: nil, metadata: nil, mobile_instance_id: nil, referral_status: nil, referred_by: nil, request_options: {}) ⇒ GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenResponse

Some parameter documentations has been truncated, see Models::CampaignCreateMobileParticipantTokenParams for more details.

Creates or returns a participant using the same input behavior as Add Participant, then returns a participant-scoped token for GrowSurf mobile SDK participant endpoints. Use this endpoint from your backend after your mobile app authenticates a signed-in user. The program must have mobile SDK access enabled.

Parameters:

  • id (String)

    GrowSurf program ID.

  • email (String)
  • fingerprint (String)
  • first_name (String)
  • ip_address (String)
  • last_name (String)
  • metadata (Hash{Symbol=>Object})

    Shallow custom metadata object.

  • mobile_instance_id (String)

    Optional app-install scoped identifier for native mobile anti-fraud. Recommended

  • referral_status (Symbol, GrowsurfRuby::Models::Campaign::Create::ReferralStatus)
  • referred_by (String)

    Referrer participant ID or email address.

  • request_options (GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



231
232
233
234
235
236
237
238
239
240
# File 'lib/growsurf_ruby/resources/campaign.rb', line 231

def create_mobile_participant_token(id, params)
  parsed, options = GrowsurfRuby::CampaignCreateMobileParticipantTokenParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["campaign/%1$s/mobile-participant-token", id],
    body: parsed,
    model: GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenResponse,
    options: options
  )
end

#list(request_options: {}) ⇒ GrowsurfRuby::Models::CampaignListResponse

Retrieves a list of your programs. Deleted programs are not returned.

Parameters:

Returns:

See Also:



70
71
72
73
74
75
76
77
# File 'lib/growsurf_ruby/resources/campaign.rb', line 70

def list(params = {})
  @client.request(
    method: :get,
    path: "campaigns",
    model: GrowsurfRuby::Models::CampaignListResponse,
    options: params[:request_options]
  )
end

#list_affiliate_applications(id, limit: nil, offset: nil, status: nil, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateApplicationListResponse

Lists an affiliate program's applications, newest first. Applications exist on programs that review public signups (an affiliateApplicationMode of MANUAL_REVIEW or AUTO_APPROVE). A pending applicant is not a participant until their application is approved.

Parameters:

Returns:

See Also:



262
263
264
265
266
267
268
269
270
271
272
# File 'lib/growsurf_ruby/resources/campaign.rb', line 262

def list_affiliate_applications(id, params = {})
  parsed, options = GrowsurfRuby::CampaignListAffiliateApplicationsParams.dump_request(params)
  query = GrowsurfRuby::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["campaign/%1$s/affiliate-applications", id],
    query: query,
    model: GrowsurfRuby::Models::AffiliateApplicationListResponse,
    options: options
  )
end

#list_affiliate_invites(id, limit: nil, offset: nil, status: nil, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateInviteListResponse

Lists an affiliate program's enrollment invites, newest first.

Parameters:

Returns:

See Also:



291
292
293
294
295
296
297
298
299
300
301
# File 'lib/growsurf_ruby/resources/campaign.rb', line 291

def list_affiliate_invites(id, params = {})
  parsed, options = GrowsurfRuby::CampaignListAffiliateInvitesParams.dump_request(params)
  query = GrowsurfRuby::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["campaign/%1$s/affiliate-invites", id],
    query: query,
    model: GrowsurfRuby::Models::AffiliateInviteListResponse,
    options: options
  )
end

#list_commissions(id, limit: nil, next_id: nil, status: nil, request_options: {}) ⇒ GrowsurfRuby::Models::ParticipantCommissionList

Affiliate programs only. Retrieves a paged list of all participant commissions in an affiliate program.

Parameters:

Returns:

See Also:



321
322
323
324
325
326
327
328
329
330
331
# File 'lib/growsurf_ruby/resources/campaign.rb', line 321

def list_commissions(id, params = {})
  parsed, options = GrowsurfRuby::CampaignListCommissionsParams.dump_request(params)
  query = GrowsurfRuby::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["campaign/%1$s/commissions", id],
    query: query.transform_keys(next_id: "nextId"),
    model: GrowsurfRuby::ParticipantCommissionList,
    options: options
  )
end

#list_leaderboard(id, is_monthly: nil, leaderboard_type: nil, limit: nil, next_id: nil, request_options: {}) ⇒ GrowsurfRuby::Models::ParticipantList

Retrieves participants in leaderboard order for the specified leaderboard type.

Parameters:

Returns:

See Also:



352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
# File 'lib/growsurf_ruby/resources/campaign.rb', line 352

def list_leaderboard(id, params = {})
  parsed, options = GrowsurfRuby::CampaignListLeaderboardParams.dump_request(params)
  query = GrowsurfRuby::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["campaign/%1$s/leaderboard", id],
    query: query.transform_keys(
      is_monthly: "isMonthly",
      leaderboard_type: "leaderboardType",
      next_id: "nextId"
    ),
    model: GrowsurfRuby::ParticipantList,
    options: options
  )
end

#list_participants(id, limit: nil, next_id: nil, request_options: {}) ⇒ GrowsurfRuby::Models::ParticipantList

Retrieves a paged list of participants in a program.

Parameters:

  • id (String)

    GrowSurf program ID.

  • limit (Integer)

    Number of results to return. Maximum 100.

  • next_id (String)

    ID to start the next paged result set with.

  • request_options (GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



383
384
385
386
387
388
389
390
391
392
393
# File 'lib/growsurf_ruby/resources/campaign.rb', line 383

def list_participants(id, params = {})
  parsed, options = GrowsurfRuby::CampaignListParticipantsParams.dump_request(params)
  query = GrowsurfRuby::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["campaign/%1$s/participants", id],
    query: query.transform_keys(next_id: "nextId"),
    model: GrowsurfRuby::ParticipantList,
    options: options
  )
end

#list_payouts(id, limit: nil, next_id: nil, status: nil, request_options: {}) ⇒ GrowsurfRuby::Models::ParticipantPayoutList

Affiliate programs only. Retrieves a paged list of all participant payouts in an affiliate program.

Parameters:

Returns:

See Also:



413
414
415
416
417
418
419
420
421
422
423
# File 'lib/growsurf_ruby/resources/campaign.rb', line 413

def list_payouts(id, params = {})
  parsed, options = GrowsurfRuby::CampaignListPayoutsParams.dump_request(params)
  query = GrowsurfRuby::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["campaign/%1$s/payouts", id],
    query: query.transform_keys(next_id: "nextId"),
    model: GrowsurfRuby::ParticipantPayoutList,
    options: options
  )
end

#list_referrals(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: {}) ⇒ GrowsurfRuby::Models::ReferralList

Retrieves a list of all referrals and email invites made by participants in a program.

Parameters:

  • id (String)

    GrowSurf program ID.

  • desc (Boolean)

    Return results in descending order when true.

  • email (String)

    URL-encoded email value to filter referral results.

  • first_name (String)

    First name value to filter results.

  • last_name (String)

    Last name value to filter results.

  • limit (Integer)

    Number of results to return. Maximum 100.

  • next_id (String)

    ID to start the next paged result set with.

  • offset (Integer)

    Offset number used to skip through a result set.

  • referral_status (Symbol, GrowsurfRuby::Models::Campaign::ReferralStatus)
  • sort_by (Symbol, GrowsurfRuby::Models::CampaignListReferralsParams::SortBy)

    Field used to sort referral results.

  • request_options (GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/growsurf_ruby/resources/campaign.rb', line 455

def list_referrals(id, params = {})
  parsed, options = GrowsurfRuby::CampaignListReferralsParams.dump_request(params)
  query = GrowsurfRuby::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["campaign/%1$s/referrals", id],
    query: query.transform_keys(
      first_name: "firstName",
      last_name: "lastName",
      next_id: "nextId",
      referral_status: "referralStatus",
      sort_by: "sortBy"
    ),
    model: GrowsurfRuby::ReferralList,
    options: options
  )
end

#resend_affiliate_invite(invite_id, id:, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateInvite

Re-sends a pending invite with a fresh accept link (the previous link stops working). Resends are rate limited per invite; retry after a few minutes if a resend was just sent.

Parameters:

  • invite_id (String)

    Affiliate invite ID.

  • id (String)

    GrowSurf program ID.

  • request_options (GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



488
489
490
491
492
493
494
495
496
497
498
499
500
# File 'lib/growsurf_ruby/resources/campaign.rb', line 488

def resend_affiliate_invite(invite_id, params)
  parsed, options = GrowsurfRuby::CampaignResendAffiliateInviteParams.dump_request(params)
  id =
    parsed.delete(:id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :post,
    path: ["campaign/%1$s/affiliate-invites/%2$s/resend", id, invite_id],
    model: GrowsurfRuby::AffiliateInvite,
    options: options
  )
end

#retrieve(id, request_options: {}) ⇒ GrowsurfRuby::Models::CampaignAPI

Retrieves a program for the given program ID.

Parameters:

Returns:

See Also:



52
53
54
55
56
57
58
59
# File 'lib/growsurf_ruby/resources/campaign.rb', line 52

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["campaign/%1$s", id],
    model: GrowsurfRuby::CampaignAPI,
    options: params[:request_options]
  )
end

#retrieve_affiliate_application(application_id, id:, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateApplication

Returns one affiliate application, including its submitted form answers.

Parameters:

  • application_id (String)

    Affiliate application ID.

  • id (String)

    GrowSurf program ID.

  • request_options (GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



515
516
517
518
519
520
521
522
523
524
525
526
527
# File 'lib/growsurf_ruby/resources/campaign.rb', line 515

def retrieve_affiliate_application(application_id, params)
  parsed, options = GrowsurfRuby::CampaignRetrieveAffiliateApplicationParams.dump_request(params)
  id =
    parsed.delete(:id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["campaign/%1$s/affiliate-applications/%2$s", id, application_id],
    model: GrowsurfRuby::AffiliateApplication,
    options: options
  )
end

#retrieve_analytics(id, days: nil, end_date: nil, include: nil, interval: nil, start_date: nil, request_options: {}) ⇒ GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse

Some parameter documentations has been truncated, see Models::CampaignRetrieveAnalyticsParams for more details.

Retrieves analytics for a program. Pass interval to also get a time-series (series) alongside the totals, and include to add previous-period totals, status breakdowns, derived rates, or email performance. Add email to include for sent (accepted for delivery), delivered, opened, clicked, bounced, and spamComplaints metrics plus per-email-type breakdowns. Email rates are ratios from 0 to 1, and isPartial identifies windows that begin before complete coverage.

Parameters:

  • id (String)

    GrowSurf program ID.

  • days (Integer)

    Last number of days to retrieve analytics for. Defaults to 365. Maximum 1825.

  • end_date (Integer)

    End date of the analytics timeframe as a Unix timestamp in milliseconds. Require

  • include (String)

    Comma-separated list of optional data to include: previousPeriod adds totals for

  • interval (Symbol, GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams::Interval)

    When set to day, week, or month, the response also includes a series array

  • start_date (Integer)

    Start date of the analytics timeframe as a Unix timestamp in milliseconds. Requi

  • request_options (GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



559
560
561
562
563
564
565
566
567
568
569
# File 'lib/growsurf_ruby/resources/campaign.rb', line 559

def retrieve_analytics(id, params = {})
  parsed, options = GrowsurfRuby::CampaignRetrieveAnalyticsParams.dump_request(params)
  query = GrowsurfRuby::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["campaign/%1$s/analytics", id],
    query: query.transform_keys(end_date: "endDate", start_date: "startDate"),
    model: GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse,
    options: options
  )
end

#review_affiliate_application(application_id, id:, allow_immediate_reapply: nil, reapply_allowed_at: nil, rejection_reason: nil, review_note: nil, status: nil, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateApplication

Some parameter documentations has been truncated, see Models::CampaignReviewAffiliateApplicationParams for more details.

Decides a pending application. Set status to APPROVED to enroll the applicant (this creates the participant, or upgrades an existing participant with the same email), or to DENIED with an optional rejectionReason. A denied applicant may reapply after the program's reapplication cooldown; send an earlier reapplyAllowedAt (without status) to shorten that wait for one applicant. Provide exactly one of status or reapplyAllowedAt. Denial-only fields are only valid with status set to DENIED. Approval is idempotent: repeating it returns the same participant.

Parameters:

  • application_id (String)

    Affiliate application ID.

  • id (String)

    GrowSurf program ID.

  • allow_immediate_reapply (Boolean)

    Only valid when status is DENIED; let the applicant reapply right away

  • reapply_allowed_at (Integer)

    For an already-denied application, move the reapplication window to this earlier

  • rejection_reason (String)

    Short reason recorded with a denial. Only valid when status is DENIED. Maximum 255 characters.

  • review_note (String)

    Private note recorded with a denial. Only valid when status is DENIED; never shown to the applicant. Maximum 500 characters.

  • status (Symbol, GrowsurfRuby::Models::CampaignReviewAffiliateApplicationParams::Status)

    The decision. APPROVED enrolls the applicant as an affiliate; DENIED closes

  • request_options (GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



605
606
607
608
609
610
611
612
613
614
615
616
617
618
# File 'lib/growsurf_ruby/resources/campaign.rb', line 605

def review_affiliate_application(application_id, params)
  parsed, options = GrowsurfRuby::CampaignReviewAffiliateApplicationParams.dump_request(params)
  id =
    parsed.delete(:id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :patch,
    path: ["campaign/%1$s/affiliate-applications/%2$s", id, application_id],
    body: parsed,
    model: GrowsurfRuby::AffiliateApplication,
    options: options
  )
end

#revoke_affiliate_invite(invite_id, id:, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateInvite

Revokes a pending invite. Its emailed accept link stops working immediately.

Parameters:

  • invite_id (String)

    Affiliate invite ID.

  • id (String)

    GrowSurf program ID.

  • request_options (GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



633
634
635
636
637
638
639
640
641
642
643
644
645
# File 'lib/growsurf_ruby/resources/campaign.rb', line 633

def revoke_affiliate_invite(invite_id, params)
  parsed, options = GrowsurfRuby::CampaignRevokeAffiliateInviteParams.dump_request(params)
  id =
    parsed.delete(:id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :delete,
    path: ["campaign/%1$s/affiliate-invites/%2$s", id, invite_id],
    model: GrowsurfRuby::AffiliateInvite,
    options: options
  )
end

#update(id, company_logo_image_url: nil, company_name: nil, name: nil, status: nil, request_options: {}) ⇒ GrowsurfRuby::Models::CampaignAPI

Updates a program's identity and lifecycle. Only the fields you send are changed. type, urlId, and currencyISO are immutable. Editor-tab configuration (design, emails, options, installation) is edited via the dedicated config sub-resources, not here. The program cannot be deleted via this endpoint.

Parameters:

Returns:

See Also:



135
136
137
138
139
140
141
142
143
144
# File 'lib/growsurf_ruby/resources/campaign.rb', line 135

def update(id, params)
  parsed, options = GrowsurfRuby::CampaignUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["campaign/%1$s", id],
    body: parsed,
    model: GrowsurfRuby::CampaignAPI,
    options: options
  )
end