lib/yookassa/entity/confirmation.rb in yookassa-0.1.0 vs lib/yookassa/entity/confirmation.rb in yookassa-0.2.0

- old
+ new

@@ -1,16 +1,14 @@ # frozen_string_literal: true +require_relative "./types" + module Yookassa module Entity - class Confirmation - extend Dry::Initializer - extend Yookassa::Callable - include Yookassa::Optional - - option :type, proc(&:to_s), optional: true - option :confirmation_url, proc(&:to_s), optional: true - option :enforce, optional: true - option :return_url, proc(&:to_s), optional: true + class Confirmation < Dry::Struct + attribute :type, Types::String + attribute :confirmation_url, Types::String + attribute? :enforce, Types::Bool + attribute? :return_url, Types::String end end end