-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OrderBundle, CoreBundle] Serialize OrderInvoice, OrderShipment, OrderInvoiceItem and OrderShipmentItem with JMS Serializer #1129
Merged
dpfaffenbauer
merged 9 commits into
coreshop:master
from
dlhck:improvement/order-invoice-serialization
Oct 10, 2019
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bb42720
added OrderInvoice and OrderInvoiceItem serializer definition and fix…
2db9336
invoices and shipments now serialized with jms serializer
5e765c2
renamed to invoiceDate
600f617
shipments now completely serialized via JMS serializer
9e1fef9
items now serialized via JMS
0c8394b
fixed wrong param in OrderShipment
d5a3762
minor changes
435e2ed
removed line at EOF
25e369f
added BC param check
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
15 changes: 15 additions & 0 deletions
15
src/CoreShop/Bundle/CoreBundle/Resources/config/serializer/Model.OrderShipment.yml
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,15 @@ | ||
CoreShop\Component\Core\Model\OrderShipment: | ||
exclusion_policy: ALL | ||
xml_root_name: order_shipment | ||
virtual_properties: | ||
carrierName: | ||
serialized_name: carrierName | ||
exp: 'object.getCarrier() != null ? object.getCarrier().getIdentifier() : null' | ||
type: string | ||
groups: [Detailed] | ||
weight: | ||
serialized_name: weight | ||
exp: object.getWeight() | ||
type: double | ||
groups: [Detailed] | ||
|
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 |
---|---|---|
|
@@ -21,3 +21,4 @@ CoreShop\Component\Order\Model\Order: | |
exp: object.getPaymentSettings() | ||
type: array | ||
groups: [Detailed] | ||
|
44 changes: 44 additions & 0 deletions
44
src/CoreShop/Bundle/OrderBundle/Resources/config/serializer/Model.OrderInvoice.yml
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,44 @@ | ||
CoreShop\Component\Order\Model\OrderInvoice: | ||
exclusion_policy: ALL | ||
xml_root_name: order_invoice | ||
virtual_properties: | ||
o_id: | ||
serialized_name: o_id | ||
exp: object.getId() | ||
type: integer | ||
groups: [Detailed] | ||
documentType: | ||
serialized_name: documentType | ||
exp: object.getDocumentType() | ||
type: string | ||
groups: [Detailed] | ||
totalTax: | ||
serialized_name: totalTax | ||
exp: object.getTotalTax() | ||
type: integer | ||
groups: [Detailed] | ||
invoiceDate: | ||
serialized_name: invoiceDate | ||
exp: object.getInvoiceDate() | ||
type: integer | ||
groups: [Detailed] | ||
invoiceNumber: | ||
serialized_name: invoiceNumber | ||
exp: object.getInvoiceNumber() | ||
type: string | ||
groups: [Detailed] | ||
totalNet: | ||
serialized_name: totalNet | ||
exp: object.getTotal(false) | ||
type: integer | ||
groups: [Detailed] | ||
totalGross: | ||
serialized_name: totalGross | ||
exp: object.getTotal(true) | ||
type: integer | ||
groups: [Detailed] | ||
items: | ||
serialized_name: items | ||
exp: object.getItems | ||
type: array | ||
groups: [Detailed] |
14 changes: 14 additions & 0 deletions
14
src/CoreShop/Bundle/OrderBundle/Resources/config/serializer/Model.OrderInvoiceItem.yml
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,14 @@ | ||
CoreShop\Component\Order\Model\OrderInvoiceItem: | ||
exclusion_policy: ALL | ||
xml_root_name: order_invoice_item | ||
virtual_properties: | ||
_itemName: | ||
serialized_name: _itemName | ||
exp: 'object.getOrderItem() != null ? object.getOrderItem().getName() : null' # TODO: add interface check when upgrading to JMS Serializer > 3.0 | ||
type: string | ||
groups: [Detailed] | ||
name: | ||
serialized_name: name | ||
exp: 'object.getOrderItem() != null ? object.getOrderItem().getName() : null' # TODO: add interface check when upgrading to JMS Serializer > 3.0 | ||
type: string | ||
groups: [Detailed] |
34 changes: 34 additions & 0 deletions
34
src/CoreShop/Bundle/OrderBundle/Resources/config/serializer/Model.OrderShipment.yml
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 @@ | ||
CoreShop\Component\Order\Model\OrderShipment: | ||
exclusion_policy: ALL | ||
xml_root_name: order_shipment | ||
virtual_properties: | ||
o_id: | ||
serialized_name: o_id | ||
exp: object.getId() | ||
type: integer | ||
groups: [Detailed] | ||
documentType: | ||
serialized_name: documentType | ||
exp: object.getDocumentType() | ||
type: string | ||
groups: [Detailed] | ||
shipmentDate: | ||
serialized_name: shipmentDate | ||
exp: object.getShipmentDate() | ||
type: integer | ||
groups: [Detailed] | ||
shipmentNumber: | ||
serialized_name: shipmentNumber | ||
exp: object.getShipmentNumber() | ||
type: string | ||
groups: [Detailed] | ||
trackingCode: | ||
serialized_name: trackingCode | ||
exp: object.getTrackingCode() | ||
type: integer | ||
groups: [Detailed] | ||
items: | ||
serialized_name: items | ||
exp: object.getItems() | ||
type: array | ||
groups: [Detailed] |
14 changes: 14 additions & 0 deletions
14
src/CoreShop/Bundle/OrderBundle/Resources/config/serializer/Model.OrderShipmentItem.yml
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,14 @@ | ||
CoreShop\Component\Order\Model\OrderShipmentItem: | ||
exclusion_policy: ALL | ||
xml_root_name: order_shipment_item | ||
virtual_properties: | ||
_itemName: | ||
serialized_name: _itemName | ||
exp: 'object.getOrderItem() != null ? object.getOrderItem().getName() : null' # TODO: add interface check when upgrading to JMS Serializer > 3.0 | ||
type: string | ||
groups: [Detailed] | ||
name: | ||
serialized_name: name | ||
exp: 'object.getOrderItem() != null ? object.getOrderItem().getName() : null' # TODO: add interface check when upgrading to JMS Serializer > 3.0 | ||
type: string | ||
groups: [Detailed] |
2 changes: 1 addition & 1 deletion
2
src/CoreShop/Bundle/OrderBundle/Resources/config/serializer/Model.QuoteItem.yml
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,4 @@ | ||
CoreShop\Component\Order\Model\QuoteItem: | ||
exclusion_policy: ALL | ||
xml_root_name: order_item | ||
xml_root_name: quote_item | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add BC param check here pls