Sha256: 2631c631f0497c9c499e41ab036cd29c7252d1cf2086febe10b115e8e5be8321

Contents?: true

Size: 819 Bytes

Versions: 6

Compression:

Stored size: 819 Bytes

Contents

require "fortnox/api/models/base"
require "fortnox/api/models/document_base"

module Fortnox
  module API
    module Model
      class Order < Fortnox::API::Model::Base
        UNIQUE_ID = :document_number
        STUB = { customer_number: '', order_rows: [] }.freeze

        DocumentBase.ify( self )

        #CopyRemarks I remarks shall copies from order to invoice
        attribute :copy_remarks, Types::Nullable::Boolean

        # InvoiceReference Reference if an invoice is created from order
        attribute :invoice_reference, Types::Nullable::Integer.with( read_only: true )

        # OrderDate Date of order
        attribute :order_date, Types::Nullable::Date

        # OrderRows Separate object
        attribute :order_rows, Types::Strict::Array.member( Types::OrderRow )
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fortnox-api-0.5.2 lib/fortnox/api/models/order.rb
fortnox-api-0.5.1 lib/fortnox/api/models/order.rb
fortnox-api-0.5.0 lib/fortnox/api/models/order.rb
fortnox-api-0.4.0 lib/fortnox/api/models/order.rb
fortnox-api-0.3.0 lib/fortnox/api/models/order.rb
fortnox-api-0.2.0 lib/fortnox/api/models/order.rb