Class: ReactorSDK::Resources::Extension
- Inherits:
-
BaseResource
- Object
- BaseResource
- ReactorSDK::Resources::Extension
- Defined in:
- lib/reactor_sdk/resources/extension.rb
Instance Attribute Summary
Attributes inherited from BaseResource
#attributes, #id, #meta, #relationships, #type
Instance Method Summary collapse
-
#created_at ⇒ String
ISO8601 timestamp when the extension was installed.
-
#delegate_descriptor_id ⇒ String
Identifies the extension package and version.
-
#inspect ⇒ String
Human-readable representation.
-
#name ⇒ String
Display name of the extension.
-
#parsed_settings ⇒ Hash
Returns the settings field parsed into a Ruby Hash.
-
#published_at ⇒ String?
ISO8601 timestamp when the extension was published.
-
#settings ⇒ String
Raw settings value exactly as returned by Adobe.
-
#updated_at ⇒ String
ISO8601 timestamp when the extension was last updated.
Methods inherited from BaseResource
#==, #[], attribute, #initialize, #relationship_data, #relationship_id, #relationship_ids, #to_h
Constructor Details
This class inherits a constructor from ReactorSDK::Resources::BaseResource
Instance Method Details
#created_at ⇒ String
Returns ISO8601 timestamp when the extension was installed.
29 |
# File 'lib/reactor_sdk/resources/extension.rb', line 29 attribute :created_at |
#delegate_descriptor_id ⇒ String
Returns Identifies the extension package and version.
20 |
# File 'lib/reactor_sdk/resources/extension.rb', line 20 attribute :delegate_descriptor_id |
#inspect ⇒ String
Returns Human-readable representation.
59 60 61 62 63 |
# File 'lib/reactor_sdk/resources/extension.rb', line 59 def inspect '#<ReactorSDK::Resources::Extension ' \ "id=#{id.inspect} " \ "delegate=#{delegate_descriptor_id.inspect}>" end |
#name ⇒ String
Returns Display name of the extension.
23 |
# File 'lib/reactor_sdk/resources/extension.rb', line 23 attribute :name |
#parsed_settings ⇒ Hash
Returns the settings field parsed into a Ruby Hash.
Extension-level settings vary by extension type. Use this for display and diffing — exactly as Adobe Launch does in its own version comparison UI.
46 47 48 49 50 51 52 53 54 |
# File 'lib/reactor_sdk/resources/extension.rb', line 46 def parsed_settings raw = @attributes['settings'] return {} if raw.nil? || raw == '' return raw if raw.is_a?(Hash) JSON.parse(raw) rescue JSON::ParserError {} end |
#published_at ⇒ String?
Returns ISO8601 timestamp when the extension was published.
35 |
# File 'lib/reactor_sdk/resources/extension.rb', line 35 attribute :published_at |
#settings ⇒ String
Returns Raw settings value exactly as returned by Adobe.
26 |
# File 'lib/reactor_sdk/resources/extension.rb', line 26 attribute :settings |
#updated_at ⇒ String
Returns ISO8601 timestamp when the extension was last updated.
32 |
# File 'lib/reactor_sdk/resources/extension.rb', line 32 attribute :updated_at |