Class: LinkIO::DeepLinkData

Inherits:
Object
  • Object
show all
Defined in:
lib/linkio/deep_link_data.rb

Overview

The resolved deep link returned to a client (e.g. an SDK) when it retrieves a pending link. deferred indicates the link was stored before the app was installed/opened.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url:, params:, deferred: true) ⇒ DeepLinkData

Returns a new instance of DeepLinkData.

Parameters:

  • url (String)
  • params (Hash)
  • deferred (Boolean) (defaults to: true)


13
14
15
16
17
# File 'lib/linkio/deep_link_data.rb', line 13

def initialize(url:, params:, deferred: true)
  @url = url
  @params = params || {}
  @deferred = deferred
end

Instance Attribute Details

#deferredObject (readonly) Also known as: deferred?

Returns the value of attribute deferred.



8
9
10
# File 'lib/linkio/deep_link_data.rb', line 8

def deferred
  @deferred
end

#paramsObject (readonly)

Returns the value of attribute params.



8
9
10
# File 'lib/linkio/deep_link_data.rb', line 8

def params
  @params
end

#urlObject (readonly)

Returns the value of attribute url.



8
9
10
# File 'lib/linkio/deep_link_data.rb', line 8

def url
  @url
end

Instance Method Details

#to_hHash

Returns:

  • (Hash)


22
23
24
25
26
27
28
# File 'lib/linkio/deep_link_data.rb', line 22

def to_h
  {
    "url" => url,
    "params" => params,
    "isDeferred" => deferred
  }
end