Class: Bakong::OpenApi::SourceInfo

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

Overview

Optional metadata sent alongside a deep-link generation request so 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/open_api/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/open_api/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/open_api/source_info.rb', line 7

def app_name
  @app_name
end

Instance Method Details

#complete?Boolean

Returns:

  • (Boolean)


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

def complete?
  [app_icon_url, app_name, app_deep_link_callback].all? { |v| v.is_a?(String) && !v.empty? }
end

#to_payloadObject



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

def to_payload
  {
    app_icon_url: app_icon_url,
    app_name: app_name,
    app_deep_link_callback: app_deep_link_callback
  }
end