Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Proforma Invoices & Items resources, Bump to 2.0.1
- Loading branch information
Gaultier Laperche
committed
Jun 17, 2019
1 parent
c60bc6b
commit c15765e
Showing
11 changed files
with
133 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
# Changelog | ||
|
||
## 2.0.1 - 2019-06-17 | ||
* Add basic support for proforma invoices and proforma invoice items | ||
* Add the possibility to transform a draft invoice into a proforma | ||
|
||
## 2.0.0 - 2018-04-19 | ||
* Initial commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0 | ||
2.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
|
||
namespace Octobat; | ||
|
||
/** | ||
* Class ProformaInvoice | ||
* | ||
* @property string $id | ||
* @property string $object | ||
* @property bool $livemode | ||
* @property string $customer | ||
* @property string $invoice | ||
* @property string $document_template | ||
* @property string $pdf_file_url | ||
* @property string $proforma_invoice_number | ||
* @property string $proforma_invoice_date | ||
* @property string $description | ||
* @property int $total_extratax_amount | ||
* @property int $total_tax_amount | ||
* @property int $total_gross_amount | ||
* @property string $notes | ||
* @property string $language | ||
* @property string $customer_locale | ||
* @property string $currency | ||
* @property string $customer_name | ||
* @property string $customer_address_line_1 | ||
* @property string $customer_address_line_2 | ||
* @property string $customer_address_city | ||
* @property string $customer_address_state | ||
* @property string $customer_address_zip | ||
* @property string $customer_address_country | ||
* @property string $customer_country_code | ||
* @property string $customer_tax_number | ||
* @property string $customer_business_type | ||
* @property string $supplier_address_line_1 | ||
* @property string $supplier_address_line_2 | ||
* @property string $supplier_address_city | ||
* @property string $supplier_address_state | ||
* @property string $supplier_address_zip | ||
* @property string $supplier_address_country | ||
* @property string $supplier_tax_number | ||
* @property OctobatObject $legal_fields | ||
* @property OctobatObject $metadata | ||
* @property int $proforma_invoice_items_count | ||
* @property Collection $proforma_invoice_items | ||
* | ||
* @package Octobat | ||
*/ | ||
class ProformaInvoice extends ApiResource | ||
{ | ||
use ApiOperations\All; | ||
use ApiOperations\Create; | ||
use ApiOperations\NestedResource; | ||
|
||
public static function getSavedNestedResources() | ||
{ | ||
static $savedNestedResources = null; | ||
if ($savedNestedResources === null) { | ||
$savedNestedResources = new Util\Set([ | ||
'proforma_invoice_item', | ||
]); | ||
} | ||
return $savedNestedResources; | ||
} | ||
|
||
const PATH_PROFORMA_INVOICE_ITEMS = '/proforma_invoice_items'; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Octobat; | ||
|
||
|
||
/** | ||
* Class ProformaInvoiceItem | ||
* | ||
* @property string $id | ||
* @property string $object | ||
* @property string $customer | ||
* @property string $proforma_invoice | ||
* @property string $product_type | ||
* @property string $sale_mode | ||
* @property string $description | ||
* @property int $quantity | ||
* @property int $unit_extratax_amount | ||
* @property int $extratax_amount | ||
* @property int $tax_amount | ||
* @property int $gross_amount | ||
* @property string $currency | ||
* @property float $tax_rate | ||
* @property string $tax | ||
* @property OctobatObject $period | ||
* @property OctobatObject $tax_evidence | ||
* @property OctobatObject $product | ||
* | ||
* @package Octobat | ||
*/ | ||
class ProformaInvoiceItem extends ApiResource | ||
{ | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters