GXParcelTrackingCodeWriter

Class GXParcelTrackingCodeWriter

package

Default

Methods

TrackingCodesWriter constructor.

__construct(\CI_DB_query_builder $db) 

Arguments

$db

\CI_DB_query_builder

Saves the given order tracking code information in the order parcel tracking codes table.

save(\ParcelTrackingCodeServiceId $parcelServiceId, \ParcelTrackingCodeOrderId $orderId, \OrderParcelTrackingCode $trackingCode, \ParcelTrackingCodeLanguageId $languageId) : \ParcelTrackingCodeId

Data for parcel service name, url and comment is fetched from related tables.

Arguments

$parcelServiceId

\ParcelTrackingCodeServiceId

Id of parcel service.

$orderId

\ParcelTrackingCodeOrderId

Id of order.

$trackingCode

\OrderParcelTrackingCode

Tracking code for order.

$languageId

\ParcelTrackingCodeLanguageId

Id of selected language.

Response

\ParcelTrackingCodeId

Id of new order parcel tracking code.

Saves the given order tracking code information in the order parcel tracking codes table.

saveLightweight(\ParcelTrackingCodeOrderId $orderId, \ParcelTrackingCodeServiceName $name, \ParcelTrackingCodeUrl $url, \ParcelTrackingCodeComment|null $comment = null) : \ParcelTrackingCodeId

Only the provided data is stored in the database.

Arguments

$orderId

\ParcelTrackingCodeOrderId

Id of order.

$name

\ParcelTrackingCodeServiceName

Name of parcel service.

$url

\ParcelTrackingCodeUrl

Tracking code url for order.

$comment

\ParcelTrackingCodeComment|null

Comment about tracking code.

Response

\ParcelTrackingCodeId

Id of new order parcel tracking code.

Properties

db

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder

table

table : string
var

Type(s)

string