Update to Invoice Sample Documentation

This commit is contained in:
japatel
2015-01-26 13:41:24 -06:00
parent 830cb16f0f
commit 8708ba7679
2 changed files with 83 additions and 37 deletions

View File

@@ -310,7 +310,77 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3
"pageTitle": "invoice/CreateInvoice", "pageTitle": "invoice/CreateInvoice",
"title": "CreateInvoice" "title": "CreateInvoice"
}, },
"depth": 2 "depth": 2,
"outline": [
{
"type": "heading",
"data": {
"level": 1,
"title": "Create Invoice Sample",
"slug": "create-invoice-sample"
},
"depth": 1,
"children": [
{
"type": "heading",
"data": {
"level": 3,
"title": "Invoice Info",
"slug": "invoice-info"
},
"depth": 3
}, {
"type": "heading",
"data": {
"level": 3,
"title": "Merchant Info",
"slug": "merchant-info"
},
"depth": 3
}, {
"type": "heading",
"data": {
"level": 3,
"title": "Address Information",
"slug": "address-information"
},
"depth": 3
}, {
"type": "heading",
"data": {
"level": 3,
"title": "Billing Information",
"slug": "billing-information"
},
"depth": 3
}, {
"type": "heading",
"data": {
"level": 3,
"title": "Items List",
"slug": "items-list"
},
"depth": 3
}, {
"type": "heading",
"data": {
"level": 3,
"title": "Shipping Information",
"slug": "shipping-information"
},
"depth": 3
}, {
"type": "heading",
"data": {
"level": 3,
"title": "Create Invoice",
"slug": "create-invoice"
},
"depth": 3
}
]
}
]
}, { }, {
"type": "file", "type": "file",
"data": { "data": {
@@ -1260,40 +1330,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3
"pageTitle": "payouts/GetPayoutItemStatus", "pageTitle": "payouts/GetPayoutItemStatus",
"title": "GetPayoutItemStatus" "title": "GetPayoutItemStatus"
}, },
"depth": 2, "depth": 2
"outline": [
{
"type": "heading",
"data": {
"level": 1,
"title": "Get Payout Item Status Sample",
"slug": "get-payout-item-status-sample"
},
"depth": 1,
"children": [
{
"type": "heading",
"data": {
"level": 2,
"title": "Payout Item ID",
"slug": "payout-item-id"
},
"depth": 2,
"children": [
{
"type": "heading",
"data": {
"level": 3,
"title": "Get Payout Item Status",
"slug": "get-payout-item-status"
},
"depth": 3
}
]
}
]
}
]
} }
] ]
}, { }, {

View File

@@ -16,7 +16,6 @@ an invoice.</p></div></div><div class="code"><div class="wrapper"><span class="h
required for invoice APIs</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$invoice</span> required for invoice APIs</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$invoice</span>
-&gt;setMerchantInfo(<span class="hljs-keyword">new</span> MerchantInfo()) -&gt;setMerchantInfo(<span class="hljs-keyword">new</span> MerchantInfo())
-&gt;setBillingInfo(<span class="hljs-keyword">array</span>(<span class="hljs-keyword">new</span> BillingInfo())) -&gt;setBillingInfo(<span class="hljs-keyword">array</span>(<span class="hljs-keyword">new</span> BillingInfo()))
-&gt;setItems(<span class="hljs-keyword">array</span>(<span class="hljs-keyword">new</span> InvoiceItem()))
-&gt;setNote(<span class="hljs-string">"Medical Invoice 16 Jul, 2013 PST"</span>) -&gt;setNote(<span class="hljs-string">"Medical Invoice 16 Jul, 2013 PST"</span>)
-&gt;setPaymentTerm(<span class="hljs-keyword">new</span> PaymentTerm()) -&gt;setPaymentTerm(<span class="hljs-keyword">new</span> PaymentTerm())
-&gt;setShippingInfo(<span class="hljs-keyword">new</span> ShippingInfo());</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="merchant-info">Merchant Info</h3> -&gt;setShippingInfo(<span class="hljs-keyword">new</span> ShippingInfo());</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="merchant-info">Merchant Info</h3>
@@ -42,15 +41,25 @@ used to identify merchant</p></div></div><div class="code"><div class="wrapper">
<span class="hljs-variable">$billing</span>[<span class="hljs-number">0</span>] <span class="hljs-variable">$billing</span>[<span class="hljs-number">0</span>]
-&gt;setEmail(<span class="hljs-string">"example@example.com"</span>);</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="items-list">Items List</h3> -&gt;setEmail(<span class="hljs-string">"example@example.com"</span>);</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="items-list">Items List</h3>
<p>You could provide the list of all items for <p>You could provide the list of all items for
detailed breakdown of invoice</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$items</span> = <span class="hljs-variable">$invoice</span>-&gt;getItems(); detailed breakdown of invoice</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$items</span> = <span class="hljs-keyword">array</span>();
<span class="hljs-variable">$items</span>[<span class="hljs-number">0</span>] = <span class="hljs-keyword">new</span> InvoiceItem();
<span class="hljs-variable">$items</span>[<span class="hljs-number">0</span>] <span class="hljs-variable">$items</span>[<span class="hljs-number">0</span>]
-&gt;setName(<span class="hljs-string">"Sutures"</span>) -&gt;setName(<span class="hljs-string">"Sutures"</span>)
-&gt;setQuantity(<span class="hljs-number">100</span>) -&gt;setQuantity(<span class="hljs-number">100</span>)
-&gt;setUnitPrice(<span class="hljs-keyword">new</span> Currency()); -&gt;setUnitPrice(<span class="hljs-keyword">new</span> Currency());
<span class="hljs-variable">$items</span>[<span class="hljs-number">0</span>]-&gt;getUnitPrice() <span class="hljs-variable">$items</span>[<span class="hljs-number">0</span>]-&gt;getUnitPrice()
-&gt;setCurrency(<span class="hljs-string">"USD"</span>)
-&gt;setValue(<span class="hljs-number">5</span>);</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Second Item</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$items</span>[<span class="hljs-number">1</span>] = <span class="hljs-keyword">new</span> InvoiceItem();
<span class="hljs-variable">$items</span>[<span class="hljs-number">1</span>]
-&gt;setName(<span class="hljs-string">"Injection"</span>)
-&gt;setQuantity(<span class="hljs-number">5</span>)
-&gt;setUnitPrice(<span class="hljs-keyword">new</span> Currency());
<span class="hljs-variable">$items</span>[<span class="hljs-number">1</span>]-&gt;getUnitPrice()
-&gt;setCurrency(<span class="hljs-string">"USD"</span>) -&gt;setCurrency(<span class="hljs-string">"USD"</span>)
-&gt;setValue(<span class="hljs-number">5</span>); -&gt;setValue(<span class="hljs-number">5</span>);
<span class="hljs-variable">$invoice</span>-&gt;setItems(<span class="hljs-variable">$items</span>);
<span class="hljs-variable">$invoice</span>-&gt;getPaymentTerm() <span class="hljs-variable">$invoice</span>-&gt;getPaymentTerm()
-&gt;setTermType(<span class="hljs-string">"NET_45"</span>);</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="shipping-information">Shipping Information</h3></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-variable">$invoice</span>-&gt;getShippingInfo() -&gt;setTermType(<span class="hljs-string">"NET_45"</span>);</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="shipping-information">Shipping Information</h3></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-variable">$invoice</span>-&gt;getShippingInfo()