From 8708ba767900acfb3ae87ed4e93d4f0efe7c10f9 Mon Sep 17 00:00:00 2001
From: japatel
Date: Mon, 26 Jan 2015 13:41:24 -0600
Subject: [PATCH] Update to Invoice Sample Documentation
---
sample/doc/assets/behavior.js | 107 +++++++++++++++++---------
sample/doc/invoice/CreateInvoice.html | 13 +++-
2 files changed, 83 insertions(+), 37 deletions(-)
diff --git a/sample/doc/assets/behavior.js b/sample/doc/assets/behavior.js
index 117f5f4..9fd4c5a 100644
--- a/sample/doc/assets/behavior.js
+++ b/sample/doc/assets/behavior.js
@@ -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",
"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",
"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",
"title": "GetPayoutItemStatus"
},
- "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
- }
- ]
- }
- ]
- }
- ]
+ "depth": 2
}
]
}, {
diff --git a/sample/doc/invoice/CreateInvoice.html b/sample/doc/invoice/CreateInvoice.html
index b7303e6..a75c1ea 100644
--- a/sample/doc/invoice/CreateInvoice.html
+++ b/sample/doc/invoice/CreateInvoice.html
@@ -16,7 +16,6 @@ an invoice.
$invoice
->setMerchantInfo(new MerchantInfo())
->setBillingInfo(array(new BillingInfo()))
- ->setItems(array(new InvoiceItem()))
->setNote("Medical Invoice 16 Jul, 2013 PST")
->setPaymentTerm(new PaymentTerm())
->setShippingInfo(new ShippingInfo());
$billing[0]
->setEmail("example@example.com");
$items = $invoice->getItems();
+detailed breakdown of invoice
$items = array();
+$items[0] = new InvoiceItem();
$items[0]
->setName("Sutures")
->setQuantity(100)
->setUnitPrice(new Currency());
$items[0]->getUnitPrice()
+ ->setCurrency("USD")
+ ->setValue(5);
$items[1] = new InvoiceItem();
+$items[1]
+ ->setName("Injection")
+ ->setQuantity(5)
+ ->setUnitPrice(new Currency());
+
+$items[1]->getUnitPrice()
->setCurrency("USD")
->setValue(5);
+$invoice->setItems($items);
$invoice->getPaymentTerm()
->setTermType("NET_45");
$invoice->getShippingInfo()
Merchant Info
@@ -42,15 +41,25 @@ used to identify merchant