Sha256: e8123c2fa35c0cb30aedc1aba1ba1a4db11d517eb25078787d6fe77531a886fe

Contents?: true

Size: 473 Bytes

Versions: 2

Compression:

Stored size: 473 Bytes

Contents

class Skr.Api.Models.Sku extends Skr.Api.Models.Base

    props:
        id:          {type:"integer"}
        code:        {type:"code"   }
        description: {type:"string" }
        price:       {type:"bigdec" }
        default_uom_code:    {type:"string" }

    derived:
        display_price: deps: ['price'], fn: ->
            Lanes.u.format.currency @price

    @findByCode: (code) ->
        sku = new Skr.Api.Models.Sku({code})
        sku.fetch(query: {code})

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stockor-0.5.0 client/skr/api/Models/Sku.coffee
stockor-0.4.0 client/skr/api/Models/Sku.coffee