Sha256: bfbcfa7206ef6b25bd4657c7e22a72cdf4265338448cd4a7b00925b4f224795a

Contents?: true

Size: 788 Bytes

Versions: 8

Compression:

Stored size: 788 Bytes

Contents

module Xeroizer
  module Record
    
    class PaymentModel < BaseModel
        
      set_xml_root_name 'Payments'
      set_permissions :read, :write
      
    end
    
    class Payment < Base
      
      set_primary_key :payment_id
      
      guid      :payment_id
      date      :date
      decimal   :amount
      decimal   :currency_rate
      string    :payment_type
      string    :status
      string    :reference
      datetime  :updated_date_utc, :api_name => 'UpdatedDateUTC'

      belongs_to  :account
      belongs_to  :invoice
      
      def invoice_id
        invoice.id if invoice
      end
      
      def account_id
        account.id if account
      end
      
      def account_code
        account.code if account
      end
      
    end
    
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
xeroizer-2.15.3 lib/xeroizer/models/payment.rb
xeroizer-2.15.2 lib/xeroizer/models/payment.rb
xeroizer-2.15.1 lib/xeroizer/models/payment.rb
xeroizer-2.15.0 lib/xeroizer/models/payment.rb
xeroizer-0.5.2 lib/xeroizer/models/payment.rb
xeroizer-0.5.1 lib/xeroizer/models/payment.rb
xeroizer-0.5.0 lib/xeroizer/models/payment.rb
xeroizer-0.4.4 lib/xeroizer/models/payment.rb