Sha256: 43147eb632d8fbe65c96389a69d4964381f49337ac0466912719e5a0c0903334

Contents?: true

Size: 1.72 KB

Versions: 71

Compression:

Stored size: 1.72 KB

Contents

module Alula
  class DeviceCredit < Alula::RestResource
    extend Alula::ResourceAttributes
    extend Alula::ApiOperations::Request
    extend Alula::ApiOperations::List
    extend Alula::ApiOperations::Save

    resource_path 'devices/credits'
    type 'devices-credit'

    # Resource Fields
    # Not all params are used at the moment. See Alula::ResourceAttributes for details
    # on how params are parsed,
    field :id,
          type: :string,
          sortable: true,
          filterable: true,
          creatable_by: [],
          patchable_by: []

    field :device_id,
          type: :string,
          sortable: true,
          filterable: true,
          creatable_by: [:system],
          patchable_by: []

    field :credit_type,
          type: :string,
          sortable: true,
          filterable: true,
          creatable_by: [:system],
          patchable_by: []

    field :initial_amount,
          type: :number,
          sortable: true,
          filterable: false,
          creatable_by: [:system],
          patchable_by: [:system]
      
    field :used_amount,
          type: :number,
          sortable: true,
          filterable: false,
          creatable_by: [],
          patchable_by: [:system]
    
    field :date_modified,
          type: :date,
          sortable: true,
          filterable: false,
          creatable_by: [],
          patchable_by: []
    
    field :date_created,
          type: :date,
          sortable: true,
          filterable: false,
          creatable_by: [],
          patchable_by: []
    
    field :expiration_date,
          type: :date,
          sortable: true,
          filterable: false,
          creatable_by: [:system],
          patchable_by: [:system]
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
alula-ruby-1.9.13 lib/alula/resources/device_credit.rb
alula-ruby-1.9.12 lib/alula/resources/device_credit.rb
alula-ruby-1.9.11 lib/alula/resources/device_credit.rb
alula-ruby-1.9.10 lib/alula/resources/device_credit.rb
alula-ruby-1.9.9 lib/alula/resources/device_credit.rb
alula-ruby-1.9.8 lib/alula/resources/device_credit.rb
alula-ruby-1.9.7 lib/alula/resources/device_credit.rb
alula-ruby-1.9.6 lib/alula/resources/device_credit.rb
alula-ruby-1.9.5 lib/alula/resources/device_credit.rb
alula-ruby-1.9.4 lib/alula/resources/device_credit.rb
alula-ruby-1.9.3 lib/alula/resources/device_credit.rb
alula-ruby-1.9.2 lib/alula/resources/device_credit.rb
alula-ruby-1.9.1 lib/alula/resources/device_credit.rb
alula-ruby-1.9.0 lib/alula/resources/device_credit.rb
alula-ruby-1.8.1 lib/alula/resources/device_credit.rb
alula-ruby-1.8.0 lib/alula/resources/device_credit.rb
alula-ruby-1.7.0 lib/alula/resources/device_credit.rb
alula-ruby-1.6.0 lib/alula/resources/device_credit.rb
alula-ruby-1.5.0 lib/alula/resources/device_credit.rb
alula-ruby-1.4.0 lib/alula/resources/device_credit.rb