2017 © Pedro Peláez
 

library clear-structure-sentry-data-service

A library that allows you to import standard import files into the Sentry system.

image

dprmc/clear-structure-sentry-data-service

A library that allows you to import standard import files into the Sentry system.

  • Tuesday, July 24, 2018
  • by DPRMC
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

ClearStructure - Sentry - Data Service

Coverage Status Build Status Total Downloads Latest Stable Version License, (*1)

ImportExcel

Used to import Standard Import Files as defined by ClearStructure., (*2)

Check Sentry's documentation for the proper format if a Standard Import File., (*3)

// This will attempt to import the contents of 'standard_import_file.xlsx' into the UAT site.
// Change the 2nd parameter of the run() method to true to import to your production site.

use DPRMC\ClearStructure\Sentry\DataService\Services\ImportExcel;

$uatUrl           = 'http://your-uat-url';
$prodUrl          = 'http://your-prod-url';
$user             = 'yourSentryUserName';
$pass             = 'yourEncryptedSentryPassword';
$pathToImportFile = 'standard_import_file.xlsx';
$postToUAT        = true;

$importExcelResponse = ImportExcel::init( $uatUrl, $prodUrl, $user, $pass, $postToUAT )
                           ->setData($pathToImportFile)
                           ->run();

// Contents of $importExcelResponse->response() if everything goes well:
Array
(
    [time] => Carbon\Carbon Object
        (
            [date] => 2018-08-03 16:12:23.000000
            [timezone_type] => 3
            [timezone] => UTC
        )

    [name] => Security_Attribute_Update
    [num] => 2
    [runtime] => 296.8872
    [errors] => Array
        (
        )

    [warnings] => Array
        (
        )
)

// Call path() to get the local filepath of the xlsx that was uploaded to Sentry.
$importExcelResponse->path();

Deleting Data


$data = []; $data[] = [ 'scheme_identifier' => 42, 'scheme_name' => 'SentryId', 'market_data_authority_name' => 'DB', 'action' => 'DELETE', 'as_of_date' => '1/1/2018', ]; $data[] = [ 'scheme_identifier' => 'ABCDEFGH1', 'scheme_name' => 'CUSIP', 'market_data_authority_name' => 'DB', 'action' => 'DELETE', 'as_of_date' => '1/1/2018', ]; $deleteExcelResponse = DeleteExcelSecurityPricing::init( $uatUrl, $prodUrl, $user, $pass, $postToUAT ) ->setData($data) ->delete();

Testing

Want to run the PHPUnit tests?, (*4)

foo@bar:~$ php ./phpunit-5.7.27.phar

The Versions

24/07 2018

dev-master

9999999-dev

A library that allows you to import standard import files into the Sentry system.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Drennen

24/07 2018

v0.16

0.16.0.0

A library that allows you to import standard import files into the Sentry system.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Drennen

19/07 2018

v0.15

0.15.0.0

A library that allows you to import standard import files into the Sentry system.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Drennen

19/07 2018

v0.14

0.14.0.0

A library that allows you to import standard import files into the Sentry system.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Drennen

18/07 2018

v0.13

0.13.0.0

A library that allows you to import standard import files into the Sentry system.

  Sources   Download

MIT

by Michael Drennen

17/07 2018

v0.12

0.12.0.0

A library that allows you to import standard import files into the Sentry system.

  Sources   Download

MIT

by Michael Drennen

13/07 2018

v0.1

0.1.0.0

  Sources   Download

MIT

by Michael Drennen