Sha256: 096dfb1f00affb2ba929131765625adb5f511f5c27eaa1afd4dc83f587140338

Contents?: true

Size: 1.26 KB

Versions: 3

Compression:

Stored size: 1.26 KB

Contents

[![Build Status](https://travis-ci.org/NetSweet/netsuite_rails.svg?branch=master)](https://travis-ci.org/NetSweet/netsuite_rails)

# NetSuite Rails

**Note:** Documentation is horrible... look at the code for details.

Build custom Ruby on Rails applications that sync to NetSuite.

## Installation

```ruby
gem 'netsuite_rails'
```

Install the database migration for poll timestamps

```bash
rails g netsuite_rails:install
```

### Date & Time

```ruby
# set your timezone offset
NetSuiteRails::Configuration.netsuite_instance_time_zone_offset(-6)
```

## Usage

modes: :read, :read_write, :aggressive

When using a proc in a NS mapping, you are responsible for setting local and remote values

for pushing tasks to DJ https://github.com/collectiveidea/delayed_job/wiki/Rake-Task-as-a-Delayed-Job

`:if` for controlling when syncing occurs

TODO hooks for before/after push/pull

### Syncing

```bash
rake netsuite:sync

rake netsuite:fresh_sync
```

Caveats:

* If you have date time fields, or custom fields that will trigger `changed_attributes` this might cause issues when pulling an existing record
* `changed_attributes` doesn't work well with store

## Testing

```ruby
# in spec_helper.rb
require 'netsuite_rails/spec/spec_helper'
```

## Author

* Michael Bianco @iloveitaly

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
netsuite_rails-0.2.2 README.md
netsuite_rails-0.2.1 README.md
netsuite_rails-0.2.0 README.md