Sha256: 36451ccd966d2bd758e5fa820c7b81e2071314ece2e6bb90623e733940235444

Contents?: true

Size: 600 Bytes

Versions: 2

Compression:

Stored size: 600 Bytes

Contents

module Nova
  module API
    module Resource
      class Installment < Nova::API::Base
        ALLOWED_ATTRIBUTES = %i[due_date gross_value number value]

        attribute? :id, Dry::Types['coercible.integer'].optional
        attribute :due_date, Dry::Types['coercible.string'].constrained(format: DATE_REGEX)
        attribute? :gross_value, Dry::Types['coercible.decimal'].optional
        attribute :number, Dry::Types['coercible.integer']
        attribute :value, Dry::Types['coercible.decimal']

        def self.endpoint
          '/api/installments'
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nova-api-0.6.0 lib/nova/api/resource/installment.rb
nova-api-0.5.0 lib/nova/api/resource/installment.rb