Class: GrowsurfRuby::Resources::Campaign::Installation
- Inherits:
-
Object
- Object
- GrowsurfRuby::Resources::Campaign::Installation
- Defined in:
- lib/growsurf_ruby/resources/campaign/installation.rb,
sig/growsurf_ruby/resources/campaign/installation.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Installation
constructor
private
A new instance of Installation.
-
#retrieve(id, request_options: {}) ⇒ Hash{Symbol=>Object}
Retrieves a program's installation configuration — the same surface as the dashboard Program Editor's Installation tab (plus the Mobile SDK settings).
-
#update(id, body, request_options: {}) ⇒ Hash{Symbol=>Object}
Updates a program's installation configuration.
Constructor Details
#initialize(client:) ⇒ Installation
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 Installation.
57 58 59 |
# File 'lib/growsurf_ruby/resources/campaign/installation.rb', line 57 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(id, request_options: {}) ⇒ Hash{Symbol=>Object}
Retrieves a program's installation configuration — the same surface as the dashboard Program Editor's Installation tab (plus the Mobile SDK settings). Includes the referral trigger (referral programs only), signup tracking method, share URL and whitelist, custom-form signup settings, and mobile SDK settings.
19 20 21 22 23 24 25 26 |
# File 'lib/growsurf_ruby/resources/campaign/installation.rb', line 19 def retrieve(id, params = {}) @client.request( method: :get, path: ["campaign/%1$s/installation", 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 installation configuration. Only the fields you send are
changed; omitted fields are left untouched. referralTrigger is only available
for referral programs. mobile.publicKey is read-only; if no key exists yet,
enabling mobile.isEnabled creates one. Changing shareUrl re-resolves its
redirect destinations, which may take a moment to complete. URLs must include an
explicit http:// or https:// scheme.
44 45 46 47 48 49 50 51 52 |
# File 'lib/growsurf_ruby/resources/campaign/installation.rb', line 44 def update(id, body, params = {}) @client.request( method: :patch, path: ["campaign/%1$s/installation", id], body: body, model: GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown], options: params[:request_options] ) end |