2017 © Pedro Peláez
 

library volo-data-model

image

snowio/volo-data-model

  • Wednesday, June 13, 2018
  • by joshdifabio
  • Repository
  • 2 Watchers
  • 0 Stars
  • 229 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 10 Versions
  • 125 % Grown

The README.md

volo-data-model

Build Status codecov, (*1)

Data model for the Volo API Currently supports: - ProductImport request data - Update Order Request data, (*2)

ProductImport

  • SnowIO DataModel Model Example
 <?php
    use SnowIO\VoloDataModel\Command\ImportProductDataCommand;
    use SnowIO\VoloDataModel\ProductImport\ImportData;
    use SnowIO\VoloDataModel\ProductImport\ImportRow;
    use SnowIO\VoloDataModel\ProductImport\ImportRowCollection;
    use SnowIO\VoloDataModel\ProductImport\ImportFieldSet;
    use SnowIO\VoloDataModel\ProductImport\ImportField;
    use SnowIO\VoloDataModel\ProductImport\Layout;
    use SnowIO\VoloDataModel\ProductImport\LayoutField;

    $layout = Layout::of('Custom Layout', 'StockNumber')
        ->withLayoutField(LayoutField::of('StockNumber'));
    $importRowCollection = ImportRowCollection::of([
        ImportRow::create()
            ->withImportFields(ImportFieldSet::of([
                ImportField::of('StockNumber', '3827893279-IK89'),
            ])),
    ]);
    $importData = ImportData::create()->withImportRows($importRowCollection);
    $importProductDataCommand = ImportProductDataCommand::of($layout, $importData);

OrderUpdate

  • SnowIO DataModel Example
<?php
    use SnowIO\VoloDataModel\Command\UpdateOrderCommand;
    use SnowIO\VoloDataModel\OrderUpdate\OrderStatus;
    use SnowIO\VoloDataModel\OrderUpdate\OrderUpdate;
    use SnowIO\VoloDataModel\OrderUpdate\OrderUpdateCollection;

    $updateOrderCommand = UpdateOrderCommand::of(OrderUpdateCollection::of([
            OrderUpdate::create()
                ->withEspOrderNo(28393283)
                ->withOrderStatus(OrderStatus::WAITING_FOR_DELIVERY)
                ->withOnHoldNotes("string")
                ->withCourier("string"),
            OrderUpdate::create()
                ->withEspOrderNo(76863823)
                ->withOrderStatus(OrderStatus::WAITING_FOR_DELIVERY)
                ->withOnHoldNotes("string")
                ->withCourier("string"),
     ]));

The Versions

13/06 2018

dev-master

9999999-dev

  Sources   Download

The Development Requires

13/06 2018

v1.1.0

1.1.0.0

  Sources   Download

The Development Requires

13/06 2018

dev-feature/data-model-order

dev-feature/data-model-order

  Sources   Download

The Development Requires

09/04 2018

dev-fix/order-update-data-model

dev-fix/order-update-data-model

  Sources   Download

The Development Requires

09/04 2018

dev-fix/set-trait-exception

dev-fix/set-trait-exception

  Sources   Download

The Development Requires

29/03 2018

v1.0.0

1.0.0.0

  Sources   Download

The Development Requires

28/03 2018

dev-update-model

dev-update-model

  Sources   Download

The Development Requires

06/03 2018

dev-feature/update-readme

dev-feature/update-readme

  Sources   Download

The Development Requires

04/01 2018

v0.1.1

0.1.1.0

  Sources   Download

The Development Requires

13/12 2017

v0.1.0

0.1.0.0

  Sources   Download

The Development Requires