fferreri/netsuite-data-dumper

此包已被弃用且不再维护。未建议替代包。

帮助从您的Netsuite账户下载数据。它提取大部分支持的对象类型并将它们存储为JSON文件。

v0.1.0 2015-06-14 20:00 UTC

This package is not auto-updated.

Last update: 2020-01-28 09:40:05 UTC


README

NetSuite数据导出器(NSDD)是一个Symfony控制台应用程序,用于从NetSuite下载数据。它提取大部分支持的记录类型并将它们存储为JSON文件。所有操作都通过NetSuite的PHP工具包和Ryan Winchester的"NetSuite PHP API客户端"完成。

要求

NSDD需要PHP 5.5+

安装

安装NSDD的推荐方式是通过Composer。

$ composer create-project "fferreri/netsuite-data-dumper:dev-master" <directory-name>

配置

在运行dumper.php之前,您必须通过'config/general.ini'配置文件提供您的Netsuite凭据。

[netsuite]
endpoint = 2015_1
host     = https://webservices.netsuite.com
email    = your@netuiteusername
password = your_password
role     = your role id
account  = your account number

[debug]
enabled  = false

通常需要编辑电子邮件、密码、角色和账户字段。这些信息可在Netsuite的设置区域找到。

使用

NSDD设计得非常简单直观。您可以使用它从Netsuite下载记录并将这些记录导出为CSV文件以插入您喜欢的数据库。

从您的终端运行$ dumper.php命令,查看可用的命令和支持的参数。

$ ./dumper.php
NetsuiteDumper version 1.1

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  help       Displays help for a command
  list       Lists commands
 ns
  ns:dump    Download all records from all NetSuite known record types
  ns:export  Export records to CSV format
  ns:fields  Export record fields to the STDOUT for a given file (JSON output from ns:get or ns:dump), no matter the entity type.
  ns:get     Download records from NetSuite

ns:get

Usage:
  ns:get [options] [--] [<entity>]

Arguments:
  entity                       The entity type name to count

Options:
      --pageSize[=PAGESIZE]    The page size [default: 50]
      --startPage[=STARTPAGE]  The start page index (index base is 1) [default: 1]
      --endPage[=ENDPAGE]      The end page index (index base is 1) [default: 9999999999]
      --count                  Counts records and prints the result.

ns:dump

Usage:
  ns:dump [options]

Options:
      --pageSize[=PAGESIZE]  The page size [default: 50]
      --count                Counts records and prints the result.

ns:export

Usage:
  ns:export [options]

Options:
      --entity=ENTITY      The entity type name to export
      --fields=FIELDS      The fields to export
      --outfile[=OUTFILE]  The output file path and name
      --skip[=SKIP]        The number of records to skip [default: 0]
      --max[=MAX]          The number of records to export [default: 9999999999]

ns:fields

Usage:
  ns:fields [options] [--] [<filename>]

Arguments:
  filename                   The input file path and name

Options:
      --separator=SEPARATOR  A character or string to separate field names. [default: "\n"]

许可证

原始作品版权所有NetSuite Inc. 2015,提供“原样”。