Sha256: 6a43c2000d78353defb8ee8d964a58e7b9ededc903c4a6d3320f95bccff9fd5b

Contents?: true

Size: 1.94 KB

Versions: 2

Compression:

Stored size: 1.94 KB

Contents

require 'gecko/record/base'

module Gecko
  module Record
    class Order < Base
      has_many :fulfillments
      has_many :invoices
      has_many :order_line_items

      belongs_to :company
      belongs_to :shipping_address,     class_name: 'Address'
      belongs_to :billing_address,      class_name: 'Address'
      belongs_to :contact,              class_name: 'Contact'
      belongs_to :user,                 readonly: true
      belongs_to :assignee,             class_name: 'User'
      belongs_to :stock_location,       class_name: 'Location'
      belongs_to :currency
      # belongs_to :default_price_list,   class_name: 'PriceList'

      attribute :order_number,          String
      attribute :phone_number,          String
      attribute :email,                 String
      attribute :notes,                 String
      attribute :reference_number,      String
      attribute :status,                String
      attribute :packed_status,         String,     readonly: true
      attribute :fulfillment_status,    String,     readonly: true
      attribute :invoice_status,        String,     readonly: true
      attribute :payment_status,        String
      attribute :tax_type,              String
      attribute :issued_at,             Date
      attribute :ship_at,               Date
      attribute :tax_override,          BigDecimal, readonly: true
      attribute :tax_label,             String,     readonly: true
      attribute :source_url,            String
      attribute :document_url,          String,     readonly: true
      attribute :total,                 BigDecimal, readonly: true

      attribute :source_id,             String,     readonly: true

      ## DEPRECATED
      attribute :tracking_number,       String,     readonly: true
      # attribute :source,                String
      # attribute :invoice_numbers,       Hash[Integer => String], readonly: true
    end

    class OrderAdapter < BaseAdapter
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gecko-ruby-0.0.8 lib/gecko/record/order.rb
gecko-ruby-0.0.7 lib/gecko/record/order.rb