Class: Yoti::DynamicSharingService::LocationConstraintExtension
- Inherits:
-
Object
- Object
- Yoti::DynamicSharingService::LocationConstraintExtension
- Defined in:
- lib/yoti/dynamic_share_service/extension/location_constraint_extension.rb
Overview
A Location Constraint
Constant Summary collapse
- EXTENSION_TYPE =
'LOCATION_CONSTRAINT'
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize ⇒ LocationConstraintExtension
constructor
A new instance of LocationConstraintExtension.
- #to_json(*_args) ⇒ Object
Constructor Details
#initialize ⇒ LocationConstraintExtension
Returns a new instance of LocationConstraintExtension.
12 13 14 15 |
# File 'lib/yoti/dynamic_share_service/extension/location_constraint_extension.rb', line 12 def initialize @content = {} @type = EXTENSION_TYPE end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
9 10 11 |
# File 'lib/yoti/dynamic_share_service/extension/location_constraint_extension.rb', line 9 def content @content end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
10 11 12 |
# File 'lib/yoti/dynamic_share_service/extension/location_constraint_extension.rb', line 10 def type @type end |
Class Method Details
.builder ⇒ Object
28 29 30 |
# File 'lib/yoti/dynamic_share_service/extension/location_constraint_extension.rb', line 28 def self.builder LocationConstraintExtensionBuilder.new end |
Instance Method Details
#as_json(*_args) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/yoti/dynamic_share_service/extension/location_constraint_extension.rb', line 17 def as_json(*_args) { type: @type, content: @content } end |
#to_json(*_args) ⇒ Object
24 25 26 |
# File 'lib/yoti/dynamic_share_service/extension/location_constraint_extension.rb', line 24 def to_json(*_args) as_json.to_json end |