Class: GrowsurfRuby::Resources::Campaign::Design
- Inherits:
-
Object
- Object
- GrowsurfRuby::Resources::Campaign::Design
- Defined in:
- lib/growsurf_ruby/resources/campaign/design.rb,
sig/growsurf_ruby/resources/campaign/design.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Design
constructor
private
A new instance of Design.
-
#retrieve(id, request_options: {}) ⇒ Hash{Symbol=>Object}
Retrieves a program's configured design fields: the dashboard Program Editor's Design tab plus the payout-destination confirmation page copy configured from payout integration cards.
-
#update(id, body, request_options: {}) ⇒ Hash{Symbol=>Object}
Updates a program's design configuration, including the payout-destination confirmation page copy configured from payout integration cards.
Constructor Details
#initialize(client:) ⇒ Design
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 Design.
60 61 62 |
# File 'lib/growsurf_ruby/resources/campaign/design.rb', line 60 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(id, request_options: {}) ⇒ Hash{Symbol=>Object}
Retrieves a program's configured design fields: the dashboard Program Editor's Design
tab plus the payout-destination confirmation page copy configured from payout integration
cards. This includes the GrowSurf window layout, header, share channels and invites,
signup form, portal and landing pages, theme styling, and referral or affiliate summary
and status sections. The available fields depend on the program type.
payoutDestinationConfirmation is omitted when no confirmation fields are stored. Stored
null fields are returned as null; omitted and null fields use localized defaults.
22 23 24 25 26 27 28 29 |
# File 'lib/growsurf_ruby/resources/campaign/design.rb', line 22 def retrieve(id, params = {}) @client.request( method: :get, path: ["campaign/%1$s/design", id], model: GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown], options: params[:request_options] ) end |
#update(id, body, request_options: {}) ⇒ Hash{Symbol=>Object}
Updates a program's design configuration, including the payout-destination confirmation
page copy configured from payout integration cards. Only the fields you send are changed;
anything you leave out is untouched (arrays such as signup.fields replace wholesale).
Unknown fields, fields not available for the program type, and invalid values return a
400. Landing-page custom code and JavaScript are not editable via the API.
47 48 49 50 51 52 53 54 55 |
# File 'lib/growsurf_ruby/resources/campaign/design.rb', line 47 def update(id, body, params = {}) @client.request( method: :patch, path: ["campaign/%1$s/design", id], body: body, model: GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown], options: params[:request_options] ) end |