Class: MOCO::PurchaseDraft

Inherits:
BaseEntity show all
Defined in:
lib/moco/entities/purchase_draft.rb

Overview

Represents a MOCO purchase draft Auto-created draft purchases from document scanning

Read-only attributes:

id, title, date, company (Hash), file_url, items (Array), created_at, updated_at

Note:

Purchase drafts are created automatically when documents are uploaded/scanned in MOCO's inbox. Convert to actual purchases via the MOCO interface.

Instance Attribute Summary

Attributes inherited from BaseEntity

#attributes, #client

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseEntity

#==, #association, #destroy, #eql?, #has_many, #hash, #id, #initialize, #inspect, #reload, #save, #to_h, #to_json, #update

Constructor Details

This class inherits a constructor from MOCO::BaseEntity

Class Method Details

.entity_pathObject



17
18
19
# File 'lib/moco/entities/purchase_draft.rb', line 17

def self.entity_path
  "purchases/drafts"
end

Instance Method Details

#to_sObject



21
22
23
# File 'lib/moco/entities/purchase_draft.rb', line 21

def to_s
  "Draft ##{id}"
end