README.textile in tlconnor-xero_gateway-1.0.0 vs README.textile in tlconnor-xero_gateway-1.0.1
- old
+ new
@@ -18,35 +18,43 @@
)</code></pre>
h2. Implemented interface methods
+
+
h3. GET /api.xro/1.0/contact (get_contact_by_id)
-Example:
+Gets a contact record for a specific Xero organisation
<pre><code>
result = gateway.get_contact_by_id(contact_id)
contact = result.contact if result.success?
</code></pre>
+
+
h3. GET /api.xro/1.0/contact (get_contact_by_number)
-Example:
+Gets a contact record for a specific Xero organisation
<pre><code>
gateway.get_contact_by_number(contact_number)
</code></pre>
+
+
h3. GET /api.xro/1.0/contacts (get_contacts)
-Example:
+Gets all contact records for a particular Xero customer.
<pre><code>
gateway.get_contacts(:type => :all, :sort => :name, :direction => :desc)
</code></pre>
+
+
h3. PUT /api.xro/1.0/contact
-Example:
+Saves a contact record for a particular Xero customer. If the contact record does not exist (based on either ContactID or ContactNumber) then it’s created, otherwise it’s updated.
<pre><code>
contact = XeroGateway::Contact.new
contact.name = "The contacts name"
contact.email = "whoever@something.com"
contact.phone.number = "555 123 4567"
@@ -58,34 +66,42 @@
contact.address.post_code = "6021"
gateway.create_contact(contact)
</code></pre>
+
+
h3. GET /api.xro/1.0/invoice (get_invoice_by_id)
-Example:
+Gets an invoice record for a specific Xero organisation
<pre><code>
gateway.get_invoice_by_id(invoice_id)
</code></pre>
+
+
h3. GET /api.xro/1.0/invoice (get_invoice_by_number)
-Example:
+Gets an invoice record for a specific Xero organisation
<pre><code>
gateway.get_invoice_by_number(invoice_number)
</code></pre>
+
+
h3. GET /api.xro/1.0/invoices (get_invoices)
-Example:
+Gets all invoice records for a particular Xero customer.
<pre><code>
gateway.get_invoices(modified_since = nil)
</code></pre>
+
+
h3. PUT /api.xro/1.0/invoice
-Example:
+Inserts an invoice for a specific organization in Xero. (Currently only adding new invoices is allowed).
<pre><code>
invoice = XeroGateway::Invoice.new({
:invoice_type => "ACCREC",
:due_date => 1.month.from_now,
:invoice_number => "YOUR INVOICE NUMBER",
@@ -109,11 +125,13 @@
)
gateway.create_invoice(invoice)
</code></pre>
+
+
h3. GET /api.xro/1.0/accounts
-Example:
+Gets all accounts for a specific organization in Xero.
<pre><code>
gateway.get_accounts
</code></pre>
\ No newline at end of file