Class: Bakong::Khqr::SourceInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/bakong/khqr/source_info.rb

Overview

Optional metadata sent alongside a deep-link generation request so that the receiving wallet can render the originating app’s icon and name.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

Returns the value of attribute app_deep_link_callback

Returns:

  • (Object)

    the current value of app_deep_link_callback



7
8
9
# File 'lib/bakong/khqr/source_info.rb', line 7

def app_deep_link_callback
  @app_deep_link_callback
end

#app_icon_urlObject

Returns the value of attribute app_icon_url

Returns:

  • (Object)

    the current value of app_icon_url



7
8
9
# File 'lib/bakong/khqr/source_info.rb', line 7

def app_icon_url
  @app_icon_url
end

#app_nameObject

Returns the value of attribute app_name

Returns:

  • (Object)

    the current value of app_name



7
8
9
# File 'lib/bakong/khqr/source_info.rb', line 7

def app_name
  @app_name
end

Instance Method Details

#complete?Boolean

Returns:

  • (Boolean)


8
9
10
11
# File 'lib/bakong/khqr/source_info.rb', line 8

def complete?
  !app_icon_url.nil? && !app_name.nil? && !app_deep_link_callback.nil? &&
    app_icon_url != "" && app_name != "" && app_deep_link_callback != ""
end

#to_hObject



13
14
15
16
17
18
19
# File 'lib/bakong/khqr/source_info.rb', line 13

def to_h
  {
    appIconUrl: app_icon_url,
    appName: app_name,
    appDeepLinkCallback: app_deep_link_callback
  }
end