Class: InovaDynamicLink::BranchLinkConfiguration
- Inherits:
-
Object
- Object
- InovaDynamicLink::BranchLinkConfiguration
- Defined in:
- lib/inova_dynamic_link/branch_link_configuration.rb
Instance Attribute Summary collapse
-
#after_click_url ⇒ Object
Returns the value of attribute after_click_url.
-
#afterclick_desktop_url ⇒ Object
Returns the value of attribute afterclick_desktop_url.
-
#android_url ⇒ Object
Returns the value of attribute android_url.
-
#campaign ⇒ Object
Returns the value of attribute campaign.
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#deeplink_path ⇒ Object
Returns the value of attribute deeplink_path.
-
#desktop_url ⇒ Object
Returns the value of attribute desktop_url.
-
#desktop_web_only ⇒ Object
Returns the value of attribute desktop_web_only.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#extra_data ⇒ Object
Returns the value of attribute extra_data.
-
#fallback_url ⇒ Object
Returns the value of attribute fallback_url.
-
#feature ⇒ Object
Returns the value of attribute feature.
-
#huawei_url ⇒ Object
Returns the value of attribute huawei_url.
-
#ios_url ⇒ Object
Returns the value of attribute ios_url.
-
#link_alias ⇒ Object
Returns the value of attribute link_alias.
-
#mobile_web_only ⇒ Object
Returns the value of attribute mobile_web_only.
-
#stage ⇒ Object
Returns the value of attribute stage.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#type ⇒ Object
Returns the value of attribute type.
-
#web_only ⇒ Object
Returns the value of attribute web_only.
-
#windows_phone_url ⇒ Object
Returns the value of attribute windows_phone_url.
Instance Method Summary collapse
-
#initialize(**attributes) ⇒ BranchLinkConfiguration
constructor
A new instance of BranchLinkConfiguration.
- #to_hash ⇒ Object
Constructor Details
#initialize(**attributes) ⇒ BranchLinkConfiguration
Returns a new instance of BranchLinkConfiguration.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 10 def initialize(**attributes) attributes = { tags: {}, type: 0, duration: 7200, extra_data: {}, **attributes } raise ArgumentError, "extra_data must be a hash" unless attributes[:extra_data].is_a?(Hash) attributes.each do |key, value| if respond_to?(:"#{key}=") send(:"#{key}=", value) else raise InovaDynamicLink::UnknownAttributeError.new(key) end end end |
Instance Attribute Details
#after_click_url ⇒ Object
Returns the value of attribute after_click_url.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def after_click_url @after_click_url end |
#afterclick_desktop_url ⇒ Object
Returns the value of attribute afterclick_desktop_url.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def afterclick_desktop_url @afterclick_desktop_url end |
#android_url ⇒ Object
Returns the value of attribute android_url.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def android_url @android_url end |
#campaign ⇒ Object
Returns the value of attribute campaign.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def campaign @campaign end |
#channel ⇒ Object
Returns the value of attribute channel.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def channel @channel end |
#deeplink_path ⇒ Object
Returns the value of attribute deeplink_path.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def deeplink_path @deeplink_path end |
#desktop_url ⇒ Object
Returns the value of attribute desktop_url.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def desktop_url @desktop_url end |
#desktop_web_only ⇒ Object
Returns the value of attribute desktop_web_only.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def desktop_web_only @desktop_web_only end |
#duration ⇒ Object
Returns the value of attribute duration.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def duration @duration end |
#extra_data ⇒ Object
Returns the value of attribute extra_data.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def extra_data @extra_data end |
#fallback_url ⇒ Object
Returns the value of attribute fallback_url.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def fallback_url @fallback_url end |
#feature ⇒ Object
Returns the value of attribute feature.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def feature @feature end |
#huawei_url ⇒ Object
Returns the value of attribute huawei_url.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def huawei_url @huawei_url end |
#ios_url ⇒ Object
Returns the value of attribute ios_url.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def ios_url @ios_url end |
#link_alias ⇒ Object
Returns the value of attribute link_alias.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def link_alias @link_alias end |
#mobile_web_only ⇒ Object
Returns the value of attribute mobile_web_only.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def mobile_web_only @mobile_web_only end |
#stage ⇒ Object
Returns the value of attribute stage.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def stage @stage end |
#tags ⇒ Object
Returns the value of attribute tags.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def @tags end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def type @type end |
#web_only ⇒ Object
Returns the value of attribute web_only.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def web_only @web_only end |
#windows_phone_url ⇒ Object
Returns the value of attribute windows_phone_url.
6 7 8 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 6 def windows_phone_url @windows_phone_url end |
Instance Method Details
#to_hash ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/inova_dynamic_link/branch_link_configuration.rb', line 28 def to_hash { channel: channel, feature: feature, stage: stage, campaign: campaign, tags: , alias: link_alias, type: type, duration: duration, data: { "$fallback_url": fallback_url, "$desktop_url": desktop_url, "$ios_url": ios_url, "$android_url": android_url, "$huawei_url": huawei_url, "$windows_phone_url": windows_phone_url, "$web_only": web_only, "$desktop_web_only": desktop_web_only, "$mobile_web_only": mobile_web_only, "$after_click_url": after_click_url, "$afterclick_desktop_url": afterclick_desktop_url, "$deeplink_path": deeplink_path, **extra_data }.compact_blank }.compact_blank end |