lib/oneaccess/data_object/representer/inducement.rb in oneaccess-0.4.4 vs lib/oneaccess/data_object/representer/inducement.rb in oneaccess-0.4.5
- old
+ new
@@ -5,18 +5,18 @@
module Representer
class Inducement < Representable::Decorator
include Representable::JSON
property :receive_date, as: :ReceiveDate, type: Time,
- parse_filter: ->(value, _) { value && value.size.positive? ? Time.parse(value) : nil }
+ parse_filter: ->(value, _) { value&.size&.positive? ? Time.parse(value) : nil }
property :provider_org_id, as: :ProviderOrgId, type: Integer
property :email_inducement_id, as: :EmailInducementId, type: Integer
property :recipient_user_id, as: :RecipientUserId, type: Integer
property :sender_user_id, as: :SenderUserId, type: Integer
property :email_inducement_status_id, as: :EmailInducementStatusId, type: Integer
property :body, as: :Body, type: String
property :processed_date, as: :ProcessedDate, type: Time,
- parse_filter: ->(value, _) { value && value.size.positive? ? Time.parse(value) : nil }
+ parse_filter: ->(value, _) { value&.size&.positive? ? Time.parse(value) : nil }
property :subject, as: :Subject, type: String
end
end
end
end