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

- old
+ new

@@ -1,15 +1,19 @@ # frozen_string_literal: true -require_relative './amount' +require_relative "./types" +require_relative "./amount" module Yookassa module Entity - class Refund < Yookassa::Response - option :payment_id - option :created_at, proc(&:to_s) - option :amount, Entity::Amount - option :receipt_registration, proc(&:to_s), optional: true - option :description, proc(&:to_s), optional: true + class Refund < Dry::Struct + attribute :id, Types::String + attribute? :idempotency_key, Types::String + attribute :status, Types::String + attribute :payment_id, Types::String + attribute :created_at, Types::String + attribute :amount, Entity::Amount + attribute? :receipt_registration, Types::String + attribute :description, Types::String end end end