Class: Yoti::DynamicSharingService::Extension

Inherits:
Object
  • Object
show all
Defined in:
lib/yoti/dynamic_share_service/extension/extension.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



7
8
9
# File 'lib/yoti/dynamic_share_service/extension/extension.rb', line 7

def content
  @content
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/yoti/dynamic_share_service/extension/extension.rb', line 6

def type
  @type
end

Class Method Details

.builderObject



20
21
22
# File 'lib/yoti/dynamic_share_service/extension/extension.rb', line 20

def self.builder
  ExtensionBuilder.new
end

Instance Method Details

#as_json(*_args) ⇒ Object



13
14
15
16
17
18
# File 'lib/yoti/dynamic_share_service/extension/extension.rb', line 13

def as_json(*_args)
  {
    type: @type,
    content: @content
  }
end

#to_json(*_args) ⇒ Object



9
10
11
# File 'lib/yoti/dynamic_share_service/extension/extension.rb', line 9

def to_json(*_args)
  as_json.to_json
end