Class: GrowsurfRuby::Resources::Campaign
- Inherits:
-
Object
- Object
- GrowsurfRuby::Resources::Campaign
- 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
-
#commission ⇒ GrowsurfRuby::Resources::Campaign::Commission
readonly
Affiliate transaction, commission, and payout operations.
-
#design ⇒ GrowsurfRuby::Resources::Campaign::Design
readonly
Program Editor "Design" tab configuration operations.
-
#emails ⇒ GrowsurfRuby::Resources::Campaign::Emails
readonly
Program Editor "Emails" tab configuration operations.
-
#installation ⇒ GrowsurfRuby::Resources::Campaign::Installation
readonly
Program Editor "Installation" tab configuration operations.
-
#options ⇒ GrowsurfRuby::Resources::Campaign::Options
readonly
Program Editor "Options" tab configuration operations.
- #participant ⇒ GrowsurfRuby::Resources::Campaign::Participant readonly
-
#reward ⇒ GrowsurfRuby::Resources::Campaign::Reward
readonly
Participant reward retrieval and manual reward operations.
-
#rewards ⇒ GrowsurfRuby::Resources::Campaign::Rewards
readonly
Campaign reward configuration operations.
-
#webhooks ⇒ GrowsurfRuby::Resources::Campaign::Webhooks
readonly
Program webhook configuration operations.
Instance Method Summary collapse
-
#clone(id, request_options: {}) ⇒ GrowsurfRuby::Models::CampaignAPI
Clones an existing program into a new
DRAFTprogram. -
#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.
-
#create_affiliate_invite(id, email:, first_name: nil, last_name: nil, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateInvite
Invites someone to join the affiliate program.
-
#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.
-
#initialize(client:) ⇒ Campaign
constructor
private
A new instance of Campaign.
-
#list(request_options: {}) ⇒ GrowsurfRuby::Models::CampaignListResponse
Retrieves a list of your programs.
-
#list_affiliate_applications(id, limit: nil, offset: nil, status: nil, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateApplicationListResponse
Lists an affiliate program's applications, newest first.
-
#list_affiliate_invites(id, limit: nil, offset: nil, status: nil, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateInviteListResponse
Lists an affiliate program's enrollment invites, newest first.
-
#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.
-
#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.
-
#list_participants(id, limit: nil, next_id: nil, request_options: {}) ⇒ GrowsurfRuby::Models::ParticipantList
Retrieves a paged list of participants in a program.
-
#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.
-
#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.
-
#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).
-
#retrieve(id, request_options: {}) ⇒ GrowsurfRuby::Models::CampaignAPI
Retrieves a program for the given program ID.
-
#retrieve_affiliate_application(application_id, id:, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateApplication
Returns one affiliate application, including its submitted form answers.
-
#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.
-
#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.
-
#revoke_affiliate_invite(invite_id, id:, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateInvite
Revokes a pending invite.
-
#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.
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.
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
#commission ⇒ GrowsurfRuby::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 |
#design ⇒ GrowsurfRuby::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 |
#emails ⇒ GrowsurfRuby::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 |
#installation ⇒ GrowsurfRuby::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 |
#options ⇒ GrowsurfRuby::Resources::Campaign::Options (readonly)
Program Editor "Options" tab configuration operations.
31 32 33 |
# File 'lib/growsurf_ruby/resources/campaign.rb', line 31 def @options end |
#participant ⇒ GrowsurfRuby::Resources::Campaign::Participant (readonly)
7 8 9 |
# File 'lib/growsurf_ruby/resources/campaign.rb', line 7 def participant @participant end |
#reward ⇒ GrowsurfRuby::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 |
#rewards ⇒ GrowsurfRuby::Resources::Campaign::Rewards (readonly)
Campaign reward configuration operations.
19 20 21 |
# File 'lib/growsurf_ruby/resources/campaign.rb', line 19 def rewards @rewards end |
#webhooks ⇒ GrowsurfRuby::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.
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.
101 102 103 104 105 106 107 108 109 110 |
# File 'lib/growsurf_ruby/resources/campaign.rb', line 101 def create(params) parsed, = GrowsurfRuby::CampaignCreateParams.dump_request(params) @client.request( method: :post, path: "campaigns", body: parsed, model: GrowsurfRuby::CampaignAPI, 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.
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, = GrowsurfRuby::CampaignCreateAffiliateInviteParams.dump_request(params) @client.request( method: :post, path: ["campaign/%1$s/affiliate-invites", id], body: parsed, model: GrowsurfRuby::AffiliateInvite, 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.
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, = GrowsurfRuby::CampaignCreateMobileParticipantTokenParams.dump_request(params) @client.request( method: :post, path: ["campaign/%1$s/mobile-participant-token", id], body: parsed, model: GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenResponse, options: ) end |
#list(request_options: {}) ⇒ GrowsurfRuby::Models::CampaignListResponse
Retrieves a list of your programs. Deleted programs are not returned.
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.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) end |
#list_participants(id, limit: nil, next_id: nil, request_options: {}) ⇒ GrowsurfRuby::Models::ParticipantList
Retrieves a paged list of participants in a program.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) end |
#retrieve(id, request_options: {}) ⇒ GrowsurfRuby::Models::CampaignAPI
Retrieves a program for the given program ID.
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.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) end |
#revoke_affiliate_invite(invite_id, id:, request_options: {}) ⇒ GrowsurfRuby::Models::AffiliateInvite
Revokes a pending invite. Its emailed accept link stops working immediately.
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, = 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: ) 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.
135 136 137 138 139 140 141 142 143 144 |
# File 'lib/growsurf_ruby/resources/campaign.rb', line 135 def update(id, params) parsed, = GrowsurfRuby::CampaignUpdateParams.dump_request(params) @client.request( method: :patch, path: ["campaign/%1$s", id], body: parsed, model: GrowsurfRuby::CampaignAPI, options: ) end |