Sha256: 0d60b39268d8c000f660a74805c06afc9758a124f3718877a256b18f40e96599

Contents?: true

Size: 596 Bytes

Versions: 11

Compression:

Stored size: 596 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.float'].optional
        attribute :number, Dry::Types['coercible.integer']
        attribute :value, Dry::Types['coercible.float']

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
nova-api-1.4.6 lib/nova/api/resource/installment.rb
nova-api-1.4.5 lib/nova/api/resource/installment.rb
nova-api-1.4.3 lib/nova/api/resource/installment.rb
nova-api-1.4.1 lib/nova/api/resource/installment.rb
nova-api-1.4.0 lib/nova/api/resource/installment.rb
nova-api-1.3.0 lib/nova/api/resource/installment.rb
nova-api-1.2.0 lib/nova/api/resource/installment.rb
nova-api-1.1.0 lib/nova/api/resource/installment.rb
nova-api-1.0.0 lib/nova/api/resource/installment.rb
nova-api-0.8.0 lib/nova/api/resource/installment.rb
nova-api-0.7.0 lib/nova/api/resource/installment.rb