lib/yoti/activity_details.rb in yoti-1.5.0 vs lib/yoti/activity_details.rb in yoti-1.6.0

- old
+ new

@@ -58,10 +58,15 @@ attr_reader :base64_selfie_uri # # The age under/over attribute # + # @deprecated 2.0.0 - replaced by: + # - Yoti::Profile#age_verifications + # - Yoti::Profile#find_age_over_verification + # - Yoti::Profile#find_age_under_verification + # # @return [Boolean] # attr_reader :age_verified # @@ -77,31 +82,39 @@ # @return [Time] # attr_reader :timestamp # + # Extra data + # + # @return [ExtraData] + # + attr_reader :extra_data + + # # @param receipt [Hash] the receipt from the API request # @param decrypted_profile [Object] Protobuf AttributeList decrypted object containing the profile attributes # - def initialize(receipt, decrypted_profile = nil, decrypted_application_profile = nil) + def initialize(receipt, decrypted_profile = nil, decrypted_application_profile = nil, extra_data = nil) @remember_me_id = receipt['remember_me_id'] @user_id = @remember_me_id @receipt_id = receipt['receipt_id'] @parent_remember_me_id = receipt['parent_remember_me_id'] @outcome = receipt['sharing_outcome'] @timestamp = receipt['timestamp'] ? Time.parse(receipt['timestamp']) : nil @extended_user_profile = process_decrypted_profile(decrypted_profile) @extended_application_profile = process_decrypted_profile(decrypted_application_profile) + @extra_data = Share::ExtraData.new(extra_data) if extra_data @user_profile = @extended_user_profile.map do |name, attribute| [name, attribute.value] end.to_h end # # The user's structured postal address as JSON # - # @deprecated replaced by Profile.structured_postal_address + # @deprecated replaced by Yoti::Profile#structured_postal_address # # @return [Hash] # def structured_postal_address user_profile['structured_postal_address'] @@ -175,9 +188,11 @@ Yoti::Attribute.new(attribute.name, attr_value, anchors_list['sources'], anchors_list['verifiers'], anchors_list) end # # Processes age verification + # + # @deprecated 2.0.0 # # @param [Yoti::Protobuf::Attrpubapi::Attribute] attribute # def process_age_verified(attribute) @age_verified = attribute.value == 'true' if Yoti::AgeProcessor.is_age_verification(attribute.name)