Class: Yoti::Share::AttributeIssuanceDetails
- Inherits:
-
Object
- Object
- Yoti::Share::AttributeIssuanceDetails
- Defined in:
- lib/yoti/share/attribute_issuance_details.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#expiry_date ⇒ Object
readonly
Returns the value of attribute expiry_date.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(data_entry) ⇒ AttributeIssuanceDetails
constructor
Constructor.
Constructor Details
#initialize(data_entry) ⇒ AttributeIssuanceDetails
Constructor
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/yoti/share/attribute_issuance_details.rb', line 30 def initialize(data_entry) @token = Base64.strict_encode64(data_entry.issuance_token) begin @expiry_date = DateTime.parse(data_entry.issuing_attributes.expiry_date) rescue ArgumentError @expiry_date = nil end @attributes = data_entry.issuing_attributes.definitions.map do |defn| Definition.new(defn.name) end end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
22 23 24 |
# File 'lib/yoti/share/attribute_issuance_details.rb', line 22 def attributes @attributes end |
#expiry_date ⇒ Object (readonly)
Returns the value of attribute expiry_date.
23 24 25 |
# File 'lib/yoti/share/attribute_issuance_details.rb', line 23 def expiry_date @expiry_date end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
21 22 23 |
# File 'lib/yoti/share/attribute_issuance_details.rb', line 21 def token @token end |