Sha256: 7d74ccf7a80e3b04718136eaedd95ec78de509bd2248a31620a61564a326eef1

Contents?: true

Size: 710 Bytes

Versions: 6

Compression:

Stored size: 710 Bytes

Contents

module Xeroizer
  module Record
    
    class OnlineInvoiceModel < BaseModel

      module Extensions
        def online_invoice(id)
          application.OnlineInvoice.online_invoice(url, id)
        end
      end
    
      set_permissions :read

      def online_invoice(url, id)
        response_xml = @application.http_get(@application.client, "#{url}/#{CGI.escape(id)}/OnlineInvoice")
    
        response = parse_response(response_xml)

        response.response_items.first
      end
    
    end
    
    class OnlineInvoice < Base

      module Extensions
        def online_invoice
          parent.online_invoice(id)
        end
      end

      string :online_invoice_url

    end
    
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
xeroizer-3.0.1 lib/xeroizer/models/online_invoice.rb
xeroizer-3.0.0 lib/xeroizer/models/online_invoice.rb
xeroizer-3-pre-beta-3.0.0.pre.beta lib/xeroizer/models/online_invoice.rb
xeroizer-2.20.0 lib/xeroizer/models/online_invoice.rb
xeroizer-2.19.0 lib/xeroizer/models/online_invoice.rb
xeroizer-2.18.1 lib/xeroizer/models/online_invoice.rb