netsuite 0.0.47 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +35 -5
- data/lib/netsuite.rb +6 -0
- data/lib/netsuite/core_ext/string/lower_camelcase.rb +9 -0
- data/lib/netsuite/records/assembly_item.rb +55 -0
- data/lib/netsuite/records/custom_field_list.rb +13 -0
- data/lib/netsuite/records/department.rb +25 -0
- data/lib/netsuite/records/inventory_item.rb +3 -0
- data/lib/netsuite/records/invoice.rb +3 -3
- data/lib/netsuite/records/non_inventory_sale_item.rb +4 -1
- data/lib/netsuite/records/pricing_matrix.rb +21 -0
- data/lib/netsuite/records/term.rb +25 -0
- data/lib/netsuite/support/records.rb +3 -5
- data/lib/netsuite/version.rb +1 -1
- data/netsuite.gemspec +8 -9
- data/spec/netsuite/actions/add_spec.rb +4 -5
- data/spec/netsuite/actions/get_spec.rb +4 -4
- data/spec/netsuite/actions/initialize_spec.rb +3 -5
- data/spec/netsuite/actions/update_spec.rb +4 -5
- data/spec/netsuite/records/custom_record_spec.rb +3 -1
- data/spec/netsuite/records/customer_payment_spec.rb +2 -1
- data/spec/netsuite/records/customer_refund_spec.rb +2 -1
- data/spec/netsuite/records/customer_spec.rb +2 -1
- data/spec/netsuite/records/department_spec.rb +103 -0
- data/spec/netsuite/records/invoice_item_spec.rb +3 -1
- data/spec/netsuite/records/invoice_spec.rb +5 -4
- data/spec/netsuite/records/journal_entry_line_spec.rb +2 -1
- data/spec/netsuite/records/journal_entry_spec.rb +3 -1
- data/spec/netsuite/records/non_inventory_sale_item_spec.rb +5 -2
- data/spec/netsuite/records/term_spec.rb +96 -0
- data/spec/spec_helper.rb +3 -3
- metadata +97 -105
- data/.rvmrc +0 -1
data/README.md
CHANGED
@@ -18,13 +18,32 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
$ gem install netsuite
|
20
20
|
|
21
|
+
This gem is built for ruby 1.9.x, checkout the [1-8-stable](https://github.com/RevolutionPrep/netsuite/tree/1-8-stable) branch for ruby 1.8.x support.
|
21
22
|
## Usage
|
22
23
|
|
24
|
+
### Configuration
|
25
|
+
```ruby
|
26
|
+
NetSuite.configure do
|
27
|
+
reset!
|
28
|
+
|
29
|
+
api_version '2012_1'
|
30
|
+
|
31
|
+
# specify full wsdl URL for sandbox / production switching
|
32
|
+
wsdl "https://webservices.sandbox.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"
|
33
|
+
|
34
|
+
# login information
|
35
|
+
email 'email@domain.com'
|
36
|
+
password 'password'
|
37
|
+
account '12345'
|
38
|
+
role 1111
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
23
42
|
### Customer
|
24
43
|
|
25
44
|
* Initializing a customer can be done using a hash of attributes.
|
26
45
|
|
27
|
-
|
46
|
+
### Get
|
28
47
|
|
29
48
|
* Retrieves the customer by internalId.
|
30
49
|
|
@@ -33,7 +52,6 @@ Or install it yourself as:
|
|
33
52
|
customer.is_person # => true
|
34
53
|
```
|
35
54
|
|
36
|
-
<a name='extending'>
|
37
55
|
## Additions
|
38
56
|
|
39
57
|
* Please submit a pull request for any models or actions that you would like to be included. The API is quite large and so we will necessarily not cover all of it.
|
@@ -99,6 +117,18 @@ Or install it yourself as:
|
|
99
117
|
|
100
118
|
1. Fork it
|
101
119
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
102
|
-
3.
|
103
|
-
4.
|
104
|
-
5.
|
120
|
+
3. Write new test and ensure that `bundle exec rspec` doesn't fail
|
121
|
+
4. Commit your changes (`git commit -am 'Added some feature'`)
|
122
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
123
|
+
6. Create new Pull Request
|
124
|
+
|
125
|
+
## Fields and RecordRefs
|
126
|
+
|
127
|
+
Note that some record attributes are specified as Fields while others are specified as RecordRefs. In some cases
|
128
|
+
attributes are actually RecordRefs in the schema, but we indicate them as Fields. Our experience has shown
|
129
|
+
this works as long as the attribute is only read from and is not written to. Writing a value for an attribute
|
130
|
+
that has been wrongly specified will result in an error. Be careful when initializing objects from other objects --
|
131
|
+
they may carry attributes that write to the new object.
|
132
|
+
|
133
|
+
As we build up this gem we will replace these inconsistent Fields with RecordRefs. Feel free to contribute new Record
|
134
|
+
definitions to help us along.
|
data/lib/netsuite.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
require 'set'
|
2
2
|
|
3
|
+
require 'savon'
|
3
4
|
require 'netsuite/version'
|
4
5
|
require 'netsuite/errors'
|
5
6
|
require 'netsuite/xml_logger'
|
7
|
+
require 'netsuite/core_ext/string/lower_camelcase'
|
6
8
|
|
7
9
|
module NetSuite
|
8
10
|
autoload :Configuration, 'netsuite/configuration'
|
@@ -37,6 +39,7 @@ module NetSuite
|
|
37
39
|
end
|
38
40
|
|
39
41
|
module Records
|
42
|
+
autoload :AssemblyItem, 'netsuite/records/assembly_item'
|
40
43
|
autoload :Account, 'netsuite/records/account'
|
41
44
|
autoload :AccountingPeriod, 'netsuite/records/accounting_period'
|
42
45
|
autoload :BillAddress, 'netsuite/records/bill_address'
|
@@ -60,6 +63,7 @@ module NetSuite
|
|
60
63
|
autoload :CustomerRefundApplyList, 'netsuite/records/customer_refund_apply_list'
|
61
64
|
autoload :CustomerRefundDeposit, 'netsuite/records/customer_refund_deposit'
|
62
65
|
autoload :CustomerRefundDepositList, 'netsuite/records/customer_refund_deposit_list'
|
66
|
+
autoload :Department, 'netsuite/records/department'
|
63
67
|
autoload :Duration, 'netsuite/records/duration'
|
64
68
|
autoload :InventoryItem, 'netsuite/records/inventory_item'
|
65
69
|
autoload :Invoice, 'netsuite/records/invoice'
|
@@ -72,9 +76,11 @@ module NetSuite
|
|
72
76
|
autoload :Location, 'netsuite/records/location'
|
73
77
|
autoload :NonInventorySaleItem, 'netsuite/records/non_inventory_sale_item'
|
74
78
|
autoload :PaymentMethod, 'netsuite/records/payment_method'
|
79
|
+
autoload :PricingMatrix, 'netsuite/records/pricing_matrix'
|
75
80
|
autoload :RecordRef, 'netsuite/records/record_ref'
|
76
81
|
autoload :RevRecTemplate, 'netsuite/records/rev_rec_template'
|
77
82
|
autoload :ShipAddress, 'netsuite/records/ship_address'
|
83
|
+
autoload :Term, 'netsuite/records/term'
|
78
84
|
end
|
79
85
|
|
80
86
|
def self.configure(&block)
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class AssemblyItem
|
4
|
+
include Support::Fields
|
5
|
+
include Support::RecordRefs
|
6
|
+
include Support::Records
|
7
|
+
include Support::Actions
|
8
|
+
include Namespaces::ListAcct
|
9
|
+
|
10
|
+
actions :get, :add, :delete
|
11
|
+
|
12
|
+
fields :auto_lead_time, :auto_preferred_stock_level, :auto_reorder_point, :available_to_partners, :average_cost,
|
13
|
+
:copy_description, :cost, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :cost_units, :costing_method,
|
14
|
+
:costing_method_display, :country_of_manufacture, :created_date, :currency, :date_converted_to_inv,
|
15
|
+
:default_return_cost, :demand_modifier, :display_name, :dont_show_price, :enforce_min_qty_internally,
|
16
|
+
:exclude_from_sitemap, :featured_description, :fixed_lot_size, :handling_cost, :handling_cost_units, :include_children,
|
17
|
+
:is_donation_item, :is_drop_ship_item, :is_gco_compliant, :is_inactive, :is_online, :is_special_order_item, :is_taxable,
|
18
|
+
:item_id, :last_modified_date, :last_purchase_price, :lead_time, :manufacturer, :manufacturer_addr1, :manufacturer_city,
|
19
|
+
:manufacturer_state, :manufacturer_tariff, :manufacturer_tax_id, :manufacturer_zip, :match_bill_to_receipt,
|
20
|
+
:matrix_type, :max_donation_amount, :meta_tag_html, :minimum_quantity, :minimum_quantity_units, :mpn,
|
21
|
+
:mult_manufacture_addr, :nex_tag_category, :no_price_message, :offer_support, :on_hand_value_mli, :on_special,
|
22
|
+
:original_item_subtype, :original_item_type, :out_of_stock_behavior, :out_of_stock_message,
|
23
|
+
:overall_quantity_pricing_type, :page_title, :preference_criterion, :preferred_stock_level, :preferred_stock_level_days,
|
24
|
+
:preferred_stock_level_units, :prices_include_tax, :producer, :purchase_description, :quantity_available,
|
25
|
+
:quantity_available_units, :quantity_back_ordered, :quantity_committed, :quantity_committed_units, :quantity_on_hand,
|
26
|
+
:quantity_on_hand_units, :quantity_on_order, :quantity_on_order_units, :quantity_reorder_units, :rate,
|
27
|
+
:related_items_description, :reorder_multiple, :reorder_point, :reorder_point_units, :safety_stock_level,
|
28
|
+
:safety_stock_level_days, :safety_stock_level_units, :sales_description, :schedule_b_code, :schedule_b_number,
|
29
|
+
:schedule_b_quantity, :search_keywords, :seasonal_demand, :ship_individually, :shipping_cost, :shipping_cost_units,
|
30
|
+
:shopping_dot_com_category, :shopzilla_category_id, :show_default_donation_amount, :sitemap_priority,
|
31
|
+
:specials_description, :stock_description, :store_description, :store_detailed_description, :store_display_name,
|
32
|
+
:total_value, :track_landed_cost, :transfer_price, :upc_code, :url_component, :use_bins, :use_marginal_rates,
|
33
|
+
:vendor_name, :vsoe_deferral, :vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :weight, :weight_unit, :weight_units
|
34
|
+
|
35
|
+
record_refs :alternate_demand_source_item, :asset_account, :bill_exch_rate_variance_acct, :bill_price_variance_acct,
|
36
|
+
:bill_qty_variance_acct, :billing_schedule, :cogs_account, :cost_category, :custom_form, :deferred_revenue_account,
|
37
|
+
:demand_source, :department, :expense_account, :gain_loss_account, :income_account, :issue_product, :klass, :location,
|
38
|
+
:parent, :preferred_location, :pricing_group, :purchase_price_variance_acct, :purchase_tax_code, :purchase_unit,
|
39
|
+
:quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :ship_package, :soft_descriptor,
|
40
|
+
:stock_unit, :store_display_image, :store_display_thumbnail, :store_item_template, :supply_lot_sizing_method,
|
41
|
+
:supply_replenishment_method, :supply_type, :tax_schedule, :units_type, :vendor
|
42
|
+
|
43
|
+
field :custom_field_list, CustomFieldList
|
44
|
+
|
45
|
+
attr_reader :internal_id
|
46
|
+
attr_accessor :external_id
|
47
|
+
|
48
|
+
def initialize(attributes = {})
|
49
|
+
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
50
|
+
@external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
|
51
|
+
initialize_from_attributes_hash(attributes)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -10,11 +10,24 @@ module NetSuite
|
|
10
10
|
when Array
|
11
11
|
attributes[:custom_field].each { |custom_field| custom_fields << CustomField.new(custom_field) }
|
12
12
|
end
|
13
|
+
|
14
|
+
@custom_fields_assoc = Hash.new
|
15
|
+
custom_fields.each { |custom_field| @custom_fields_assoc[custom_field.internal_id.to_sym] = custom_field }
|
13
16
|
end
|
14
17
|
|
15
18
|
def custom_fields
|
16
19
|
@custom_fields ||= []
|
17
20
|
end
|
21
|
+
|
22
|
+
def method_missing(sym, *args, &block)
|
23
|
+
return @custom_fields_assoc[sym] if @custom_fields_assoc.include? sym
|
24
|
+
super(sym, *args, &block)
|
25
|
+
end
|
26
|
+
|
27
|
+
def respond_to?(sym, include_private = false)
|
28
|
+
return true if @custom_fields_assoc.include? sym
|
29
|
+
super
|
30
|
+
end
|
18
31
|
|
19
32
|
def to_record
|
20
33
|
custom_fields.map { |custom_field|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class Department
|
4
|
+
include Support::Fields
|
5
|
+
include Support::RecordRefs
|
6
|
+
include Support::Actions
|
7
|
+
|
8
|
+
actions :get, :add, :delete
|
9
|
+
|
10
|
+
fields :name, :is_inactive
|
11
|
+
|
12
|
+
record_refs :parent
|
13
|
+
|
14
|
+
attr_reader :internal_id
|
15
|
+
attr_accessor :external_id
|
16
|
+
|
17
|
+
def initialize(attributes = {})
|
18
|
+
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
19
|
+
@external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
|
20
|
+
initialize_from_attributes_hash(attributes)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -40,6 +40,9 @@ module NetSuite
|
|
40
40
|
:stock_unit, :store_display_image, :store_display_thumbnail, :store_item_template, :supply_lot_sizing_method,
|
41
41
|
:supply_replenishment_method, :supply_type, :tax_schedule, :units_type, :vendor
|
42
42
|
|
43
|
+
field :pricing_matrix, PricingMatrix
|
44
|
+
field :custom_field_list, CustomFieldList
|
45
|
+
|
43
46
|
attr_reader :internal_id
|
44
47
|
attr_accessor :external_id
|
45
48
|
|
@@ -11,7 +11,7 @@ module NetSuite
|
|
11
11
|
|
12
12
|
fields :alt_handling_cost, :alt_shipping_cost, :balance, :bill_address,
|
13
13
|
:billing_schedule, :contrib_pct, :created_date, :created_from, :currency_name, :custom_field_list,
|
14
|
-
:deferred_revenue, :
|
14
|
+
:deferred_revenue, :discount_amount, :discount_date, :discount_item, :discount_rate,
|
15
15
|
:due_date, :email, :end_date, :est_gross_profit, :est_gross_profit_percent, :exchange_rate,
|
16
16
|
:exclude_commission, :exp_cost_disc_amount, :exp_cost_disc_print, :exp_cost_disc_rate, :exp_cost_disc_tax_1_amt,
|
17
17
|
:exp_cost_disc_taxable, :exp_cost_discount, :exp_cost_list, :exp_cost_tax_code, :exp_cost_tax_rate_1,
|
@@ -25,7 +25,7 @@ module NetSuite
|
|
25
25
|
:sales_group, :sales_rep, :sales_team_list, :ship_address, :ship_date, :ship_group_list,
|
26
26
|
:ship_method, :shipping_cost, :shipping_tax_1_rate, :shipping_tax_2_rate, :shipping_tax_code, :source, :start_date,
|
27
27
|
:status, :subsidiary, :sync_partner_teams, :sync_sales_teams, :tax_2_total, :tax_item, :tax_rate,
|
28
|
-
:tax_total, :
|
28
|
+
:tax_total, :time_disc_amount, :time_disc_print, :time_disc_rate, :time_disc_tax_1_amt, :time_disc_taxable,
|
29
29
|
:time_discount, :time_list, :time_tax_code, :time_tax_rate_1, :time_tax_rate_2, :to_be_emailed, :to_be_faxed,
|
30
30
|
:to_be_printed, :total_cost_estimate, :tracking_numbers, :tran_date, :tran_id, :tran_is_vsoe_bundle,
|
31
31
|
:transaction_bill_address, :transaction_ship_address, :vat_reg_num, :vsoe_auto_calc
|
@@ -37,7 +37,7 @@ module NetSuite
|
|
37
37
|
|
38
38
|
read_only_fields :sub_total, :discount_total, :total, :recognized_revenue, :amount_remaining, :amount_paid
|
39
39
|
|
40
|
-
record_refs :account, :bill_address_list, :custom_form, :entity, :klass, :posting_period, :ship_address_list
|
40
|
+
record_refs :account, :bill_address_list, :custom_form, :department, :entity, :klass, :posting_period, :ship_address_list, :terms
|
41
41
|
|
42
42
|
attr_reader :internal_id
|
43
43
|
attr_accessor :external_id
|
@@ -10,7 +10,7 @@ module NetSuite
|
|
10
10
|
actions :get, :add, :delete
|
11
11
|
|
12
12
|
fields :available_to_partners, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :country_of_manufacture,
|
13
|
-
:created_date, :
|
13
|
+
:created_date, :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap,
|
14
14
|
:featured_description, :handling_cost, :handling_cost_units, :include_children, :is_donation_item, :is_fulfillable,
|
15
15
|
:is_gco_compliant, :is_inactive, :is_online, :is_taxable, :item_id, :last_modified_date, :manufacturer,
|
16
16
|
:manufacturer_addr1, :manufacturer_city, :manufacturer_state, :manufacturer_tariff, :manufacturer_tax_id,
|
@@ -30,6 +30,9 @@ module NetSuite
|
|
30
30
|
:quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :ship_package, :store_display_image,
|
31
31
|
:store_display_thumbnail, :store_item_template, :subsidiary_list, :tax_schedule, :units_type
|
32
32
|
|
33
|
+
field :pricing_matrix, PricingMatrix
|
34
|
+
field :custom_field_list, CustomFieldList
|
35
|
+
|
33
36
|
attr_reader :internal_id
|
34
37
|
attr_accessor :external_id
|
35
38
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class PricingMatrix
|
4
|
+
include Namespaces::PlatformCore
|
5
|
+
|
6
|
+
def initialize(attributes = {})
|
7
|
+
attributes[:pricing].each do |pricing|
|
8
|
+
prices << RecordRef.new(pricing)
|
9
|
+
end if attributes[:pricing]
|
10
|
+
end
|
11
|
+
|
12
|
+
def prices
|
13
|
+
@prices ||= []
|
14
|
+
end
|
15
|
+
|
16
|
+
def to_record
|
17
|
+
{ "#{record_namespace}:item" => prices.map(&:to_record) }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class Term
|
4
|
+
include Support::Fields
|
5
|
+
include Support::RecordRefs
|
6
|
+
include Support::Actions
|
7
|
+
|
8
|
+
actions :get, :add, :delete
|
9
|
+
|
10
|
+
fields :due_next_month_if_within_days, :name, :date_driven, :days_until_expiry, :days_until_next_due,
|
11
|
+
:day_discount_expires, :day_of_month_net_due, :discount_percent, :discount_percent_date_driven, :is_inactive,
|
12
|
+
:preferred
|
13
|
+
|
14
|
+
attr_reader :internal_id
|
15
|
+
attr_accessor :external_id
|
16
|
+
|
17
|
+
def initialize(attributes = {})
|
18
|
+
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
19
|
+
@external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
|
20
|
+
initialize_from_attributes_hash(attributes)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -6,11 +6,9 @@ module NetSuite
|
|
6
6
|
|
7
7
|
def to_record
|
8
8
|
attributes.reject { |k,v| self.class.read_only_fields.include?(k) }.inject({}) do |hash, (k,v)|
|
9
|
-
kname =
|
10
|
-
|
11
|
-
|
12
|
-
"#{record_namespace}:#{k.to_s.lower_camelcase}"
|
13
|
-
end
|
9
|
+
kname = "#{record_namespace}:"
|
10
|
+
kname += k == :klass ? 'class' : k.to_s.lower_camelcase
|
11
|
+
|
14
12
|
to_attributes!(hash, kname, v)
|
15
13
|
if Array === v
|
16
14
|
v = v.map { |i| i.respond_to?(:to_record) ? i.to_record : i }
|
data/lib/netsuite/version.rb
CHANGED
data/netsuite.gemspec
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
require 'netsuite/version'
|
2
|
+
require File.expand_path('../lib/netsuite/version', __FILE__)
|
4
3
|
|
5
4
|
Gem::Specification.new do |gem|
|
6
|
-
gem.authors = ['Ryan Moran']
|
7
|
-
gem.email = ['ryan.moran@gmail.com']
|
5
|
+
gem.authors = ['Ryan Moran', 'Michael Bianco']
|
6
|
+
gem.email = ['ryan.moran@gmail.com', 'info@cliffsidedev.com']
|
8
7
|
gem.description = %q{NetSuite SuiteTalk API Wrapper}
|
9
8
|
gem.summary = %q{NetSuite SuiteTalk API Wrapper}
|
10
9
|
gem.homepage = 'https://github.com/RevolutionPrep/netsuite'
|
@@ -16,10 +15,10 @@ Gem::Specification.new do |gem|
|
|
16
15
|
gem.require_paths = ['lib']
|
17
16
|
gem.version = Netsuite::VERSION
|
18
17
|
|
19
|
-
gem.add_dependency 'savon', '
|
20
|
-
gem.add_dependency 'nokogiri'
|
18
|
+
gem.add_dependency 'savon', '~> 1.2.0'
|
19
|
+
gem.add_dependency 'nokogiri', '~> 1.5.0'
|
21
20
|
|
22
|
-
gem.add_development_dependency 'rspec',
|
23
|
-
gem.add_development_dependency '
|
24
|
-
gem.add_development_dependency '
|
21
|
+
gem.add_development_dependency 'rspec', '~> 2.10'
|
22
|
+
gem.add_development_dependency 'savon_spec', '~> 1.3.0'
|
23
|
+
gem.add_development_dependency 'autotest-standalone', '~> 4.5'
|
25
24
|
end
|
@@ -14,7 +14,7 @@ describe NetSuite::Actions::Add do
|
|
14
14
|
'listRel:companyName' => 'Shutter Fly, Inc.'
|
15
15
|
},
|
16
16
|
:attributes! => {
|
17
|
-
'platformMsgs:
|
17
|
+
'platformMsgs:record' => {
|
18
18
|
'xsi:type' => 'listRel:Customer'
|
19
19
|
}
|
20
20
|
}
|
@@ -40,12 +40,11 @@ describe NetSuite::Actions::Add do
|
|
40
40
|
before do
|
41
41
|
savon.expects(:add).with({
|
42
42
|
'platformMsgs:record' => {
|
43
|
-
'
|
44
|
-
'listRel:total' => 100.0
|
43
|
+
'tranSales:source' => 'Google'
|
45
44
|
},
|
46
45
|
:attributes! => {
|
47
|
-
'platformMsgs:
|
48
|
-
'xsi:type' => '
|
46
|
+
'platformMsgs:record' => {
|
47
|
+
'xsi:type' => 'tranSales:Invoice'
|
49
48
|
}
|
50
49
|
}
|
51
50
|
}).returns(:add_invoice)
|
@@ -8,8 +8,8 @@ describe NetSuite::Actions::Get do
|
|
8
8
|
'platformMsgs:baseRef' => {},
|
9
9
|
:attributes! => {
|
10
10
|
'platformMsgs:baseRef' => {
|
11
|
-
|
12
|
-
|
11
|
+
'externalId' => 1,
|
12
|
+
'type' => 'customer',
|
13
13
|
'xsi:type' => 'platformCore:RecordRef'
|
14
14
|
}
|
15
15
|
}
|
@@ -32,8 +32,8 @@ describe NetSuite::Actions::Get do
|
|
32
32
|
'platformMsgs:baseRef' => {},
|
33
33
|
:attributes! => {
|
34
34
|
'platformMsgs:baseRef' => {
|
35
|
-
|
36
|
-
|
35
|
+
'externalId' => 1,
|
36
|
+
'type' => 'invoice',
|
37
37
|
'xsi:type' => 'platformCore:RecordRef'
|
38
38
|
}
|
39
39
|
}
|
@@ -6,13 +6,11 @@ describe NetSuite::Actions::Initialize do
|
|
6
6
|
before do
|
7
7
|
savon.expects(:initialize).with({
|
8
8
|
'platformMsgs:initializeRecord' => {
|
9
|
-
'platformCore:type' => '
|
10
|
-
'platformCore:reference' => {
|
11
|
-
'platformCore:name' => 'Ryan Moran'
|
12
|
-
},
|
9
|
+
'platformCore:type' => 'customer',
|
10
|
+
'platformCore:reference' => {},
|
13
11
|
:attributes! => {
|
14
12
|
'platformCore:reference' => {
|
15
|
-
'internalId' =>
|
13
|
+
'internalId' => 1,
|
16
14
|
:type => 'customer'
|
17
15
|
}
|
18
16
|
}
|
@@ -13,7 +13,7 @@ describe NetSuite::Actions::Update do
|
|
13
13
|
'listRel:companyName' => 'Shutter Fly, Inc.'
|
14
14
|
},
|
15
15
|
:attributes! => {
|
16
|
-
'platformMsgs:
|
16
|
+
'platformMsgs:record' => {
|
17
17
|
'xsi:type' => 'listRel:Customer'
|
18
18
|
}
|
19
19
|
}
|
@@ -38,12 +38,11 @@ describe NetSuite::Actions::Update do
|
|
38
38
|
before do
|
39
39
|
savon.expects(:update).with({
|
40
40
|
'platformMsgs:record' => {
|
41
|
-
'
|
42
|
-
'listRel:total' => 100.0
|
41
|
+
'tranSales:source' => 'Google',
|
43
42
|
},
|
44
43
|
:attributes! => {
|
45
|
-
'platformMsgs:
|
46
|
-
'xsi:type' => '
|
44
|
+
'platformMsgs:record' => {
|
45
|
+
'xsi:type' => 'tranSales:Invoice'
|
47
46
|
}
|
48
47
|
}
|
49
48
|
}).returns(:update_invoice)
|
@@ -28,12 +28,14 @@ describe NetSuite::Records::CustomRecord do
|
|
28
28
|
it 'can be set from attributes' do
|
29
29
|
attributes = {
|
30
30
|
:custom_field => {
|
31
|
-
:amount => 10
|
31
|
+
:amount => 10,
|
32
|
+
:internal_id => 'custfield_amount'
|
32
33
|
}
|
33
34
|
}
|
34
35
|
record.custom_field_list = attributes
|
35
36
|
record.custom_field_list.should be_kind_of(NetSuite::Records::CustomFieldList)
|
36
37
|
record.custom_field_list.custom_fields.length.should eql(1)
|
38
|
+
record.custom_field_list.custfield_amount.attributes[:amount].should eq(10)
|
37
39
|
end
|
38
40
|
|
39
41
|
it 'can be set from a CustomFieldList object' do
|
@@ -0,0 +1,103 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe NetSuite::Records::Department do
|
4
|
+
let(:department) { NetSuite::Records::Department.new }
|
5
|
+
|
6
|
+
it 'has all the right fields' do
|
7
|
+
[
|
8
|
+
:name, :is_inactive
|
9
|
+
].each do |field|
|
10
|
+
department.should have_field(field)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'has all the right record refs' do
|
15
|
+
[
|
16
|
+
:parent
|
17
|
+
].each do |record_ref|
|
18
|
+
department.should have_record_ref(record_ref)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '.get' do
|
23
|
+
context 'when the response is successful' do
|
24
|
+
let(:response) { NetSuite::Response.new(:success => true, :body => { :name => 'Department 1' }) }
|
25
|
+
|
26
|
+
it 'returns a Department instance populated with the data from the response object' do
|
27
|
+
NetSuite::Actions::Get.should_receive(:call).with(NetSuite::Records::Department, :external_id => 1).and_return(response)
|
28
|
+
department = NetSuite::Records::Department.get(:external_id => 1)
|
29
|
+
department.should be_kind_of(NetSuite::Records::Department)
|
30
|
+
department.name.should eql('Department 1')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'when the response is unsuccessful' do
|
35
|
+
let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
|
36
|
+
|
37
|
+
it 'raises a RecordNotFound exception' do
|
38
|
+
NetSuite::Actions::Get.should_receive(:call).with(NetSuite::Records::Department, :external_id => 1).and_return(response)
|
39
|
+
lambda {
|
40
|
+
NetSuite::Records::Department.get(:external_id => 1)
|
41
|
+
}.should raise_error(NetSuite::RecordNotFound,
|
42
|
+
/NetSuite::Records::Department with OPTIONS=(.*) could not be found/)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe '#add' do
|
48
|
+
let(:test_data) { { :acct_name => 'Test Department', :description => 'An example Department' } }
|
49
|
+
|
50
|
+
context 'when the response is successful' do
|
51
|
+
let(:response) { NetSuite::Response.new(:success => true, :body => { :internal_id => '1' }) }
|
52
|
+
|
53
|
+
it 'returns true' do
|
54
|
+
department = NetSuite::Records::Department.new(test_data)
|
55
|
+
NetSuite::Actions::Add.should_receive(:call).
|
56
|
+
with(department).
|
57
|
+
and_return(response)
|
58
|
+
department.add.should be_true
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context 'when the response is unsuccessful' do
|
63
|
+
let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
|
64
|
+
|
65
|
+
it 'returns false' do
|
66
|
+
department = NetSuite::Records::Department.new(test_data)
|
67
|
+
NetSuite::Actions::Add.should_receive(:call).
|
68
|
+
with(department).
|
69
|
+
and_return(response)
|
70
|
+
department.add.should be_false
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
describe '#delete' do
|
76
|
+
let(:test_data) { { :internal_id => '1' } }
|
77
|
+
|
78
|
+
context 'when the response is successful' do
|
79
|
+
let(:response) { NetSuite::Response.new(:success => true, :body => { :internal_id => '1' }) }
|
80
|
+
|
81
|
+
it 'returns true' do
|
82
|
+
department = NetSuite::Records::Department.new(test_data)
|
83
|
+
NetSuite::Actions::Delete.should_receive(:call).
|
84
|
+
with(department).
|
85
|
+
and_return(response)
|
86
|
+
department.delete.should be_true
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
context 'when the response is unsuccessful' do
|
91
|
+
let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
|
92
|
+
|
93
|
+
it 'returns false' do
|
94
|
+
department = NetSuite::Records::Department.new(test_data)
|
95
|
+
NetSuite::Actions::Delete.should_receive(:call).
|
96
|
+
with(department).
|
97
|
+
and_return(response)
|
98
|
+
department.delete.should be_false
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
end
|
@@ -37,12 +37,14 @@ describe NetSuite::Records::InvoiceItem do
|
|
37
37
|
it 'can be set from attributes' do
|
38
38
|
attributes = {
|
39
39
|
:custom_field => {
|
40
|
-
:value => 10
|
40
|
+
:value => 10,
|
41
|
+
:internal_id => 'custfield_value'
|
41
42
|
}
|
42
43
|
}
|
43
44
|
item.custom_field_list = attributes
|
44
45
|
item.custom_field_list.should be_kind_of(NetSuite::Records::CustomFieldList)
|
45
46
|
item.custom_field_list.custom_fields.length.should eql(1)
|
47
|
+
item.custom_field_list.custfield_value.attributes[:value].should eq(10)
|
46
48
|
end
|
47
49
|
|
48
50
|
it 'can be set from a CustomFieldList object' do
|
@@ -9,7 +9,7 @@ describe NetSuite::Records::Invoice do
|
|
9
9
|
[
|
10
10
|
:alt_handling_cost, :alt_shipping_cost, :amount_paid, :amount_remaining, :balance, :bill_address,
|
11
11
|
:billing_schedule, :contrib_pct, :created_date, :created_from, :currency_name,
|
12
|
-
:deferred_revenue, :
|
12
|
+
:deferred_revenue, :discount_amount, :discount_date, :discount_item, :discount_rate,
|
13
13
|
:due_date, :email, :end_date, :est_gross_profit, :est_gross_profit_percent, :exchange_rate,
|
14
14
|
:exclude_commission, :exp_cost_disc_amount, :exp_cost_disc_print, :exp_cost_disc_rate, :exp_cost_disc_tax_1_amt,
|
15
15
|
:exp_cost_disc_taxable, :exp_cost_discount, :exp_cost_list, :exp_cost_tax_code, :exp_cost_tax_rate_1,
|
@@ -23,7 +23,7 @@ describe NetSuite::Records::Invoice do
|
|
23
23
|
:sales_group, :sales_rep, :sales_team_list, :ship_address, :ship_date, :ship_group_list,
|
24
24
|
:ship_method, :shipping_cost, :shipping_tax_1_rate, :shipping_tax_2_rate, :shipping_tax_code, :source, :start_date,
|
25
25
|
:status, :subsidiary, :sync_partner_teams, :sync_sales_teams, :tax_2_total, :tax_item, :tax_rate,
|
26
|
-
:tax_total, :
|
26
|
+
:tax_total, :time_disc_amount, :time_disc_print, :time_disc_rate, :time_disc_tax_1_amt, :time_disc_taxable,
|
27
27
|
:time_discount, :time_list, :time_tax_code, :time_tax_rate_1, :time_tax_rate_2, :to_be_emailed, :to_be_faxed,
|
28
28
|
:to_be_printed, :total_cost_estimate, :tracking_numbers, :tran_date, :tran_id, :tran_is_vsoe_bundle,
|
29
29
|
:vat_reg_num, :vsoe_auto_calc
|
@@ -42,7 +42,7 @@ describe NetSuite::Records::Invoice do
|
|
42
42
|
|
43
43
|
it 'has the right record_refs' do
|
44
44
|
[
|
45
|
-
:account, :bill_address_list, :custom_form, :entity, :klass, :posting_period, :ship_address_list
|
45
|
+
:account, :bill_address_list, :custom_form, :department, :entity, :klass, :posting_period, :ship_address_list, :terms
|
46
46
|
].each do |record_ref|
|
47
47
|
invoice.should have_record_ref(record_ref)
|
48
48
|
end
|
@@ -52,7 +52,8 @@ describe NetSuite::Records::Invoice do
|
|
52
52
|
it 'can be set from attributes' do
|
53
53
|
attributes = {
|
54
54
|
:custom_field => {
|
55
|
-
:amount => 10
|
55
|
+
:amount => 10,
|
56
|
+
:internal_id => 'custfield_amount'
|
56
57
|
}
|
57
58
|
}
|
58
59
|
invoice.custom_field_list = attributes
|
@@ -25,12 +25,14 @@ describe NetSuite::Records::JournalEntry do
|
|
25
25
|
it 'can be set from attributes' do
|
26
26
|
attributes = {
|
27
27
|
:custom_field => {
|
28
|
-
:amount => 10
|
28
|
+
:amount => 10,
|
29
|
+
:internal_id => 'custfield_amount'
|
29
30
|
}
|
30
31
|
}
|
31
32
|
entry.custom_field_list = attributes
|
32
33
|
entry.custom_field_list.should be_kind_of(NetSuite::Records::CustomFieldList)
|
33
34
|
entry.custom_field_list.custom_fields.length.should eql(1)
|
35
|
+
entry.custom_field_list.custfield_amount.attributes[:amount].should eq(10)
|
34
36
|
end
|
35
37
|
|
36
38
|
it 'can be set from a CustomFieldList object' do
|
@@ -6,14 +6,14 @@ describe NetSuite::Records::NonInventorySaleItem do
|
|
6
6
|
it 'has the right fields' do
|
7
7
|
[
|
8
8
|
:available_to_partners, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :country_of_manufacture, :created_date,
|
9
|
-
:
|
9
|
+
:display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap,
|
10
10
|
:featured_description, :handling_cost, :handling_cost_units, :include_children, :is_donation_item, :is_fulfillable,
|
11
11
|
:is_gco_compliant, :is_inactive, :is_online, :is_taxable, :item_id, :last_modified_date, :manufacturer, :manufacturer_addr1,
|
12
12
|
:manufacturer_city, :manufacturer_state, :manufacturer_tariff, :manufacturer_tax_id, :manufacturer_zip, :matrix_option_list,
|
13
13
|
:matrix_type, :max_donation_amount, :meta_tag_html, :minimum_quantity, :minimum_quantity_units, :mpn,
|
14
14
|
:mult_manufacture_addr, :nex_tag_category, :no_price_message, :offer_support, :on_special, :out_of_stock_behavior,
|
15
15
|
:out_of_stock_message, :overall_quantity_pricing_type, :page_title, :preference_criterion, :presentation_item_list,
|
16
|
-
:prices_include_tax, :
|
16
|
+
:prices_include_tax, :producer, :product_feed_list, :rate, :related_items_description, :sales_description,
|
17
17
|
:schedule_b_code, :schedule_b_number, :schedule_b_quantity, :search_keywords, :ship_individually, :shipping_cost,
|
18
18
|
:shipping_cost_units, :shopping_dot_com_category, :shopzilla_category_id, :show_default_donation_amount,
|
19
19
|
:site_category_list, :sitemap_priority, :soft_descriptor, :specials_description, :stock_description, :store_description,
|
@@ -22,6 +22,9 @@ describe NetSuite::Records::NonInventorySaleItem do
|
|
22
22
|
].each do |field|
|
23
23
|
item.should have_field(field)
|
24
24
|
end
|
25
|
+
|
26
|
+
item.pricing_matrix.class.should == NetSuite::Records::PricingMatrix
|
27
|
+
item.custom_field_list.class.should == NetSuite::Records::CustomFieldList
|
25
28
|
end
|
26
29
|
|
27
30
|
it 'has the right record_refs' do
|
@@ -0,0 +1,96 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe NetSuite::Records::Term do
|
4
|
+
let(:term) { NetSuite::Records::Term.new }
|
5
|
+
|
6
|
+
it 'has all the right fields' do
|
7
|
+
[
|
8
|
+
:name, :date_driven, :days_until_next_due, :discount_percent, :days_until_expiry, :day_of_month_net_due,
|
9
|
+
:due_next_month_if_within_days, :discount_percent_date_driven, :day_discount_expires, :preferred, :is_inactive
|
10
|
+
].each do |field|
|
11
|
+
term.should have_field(field)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '.get' do
|
16
|
+
context 'when the response is successful' do
|
17
|
+
let(:response) { NetSuite::Response.new(:success => true, :body => { :name => 'Term 1' }) }
|
18
|
+
|
19
|
+
it 'returns a Term instance populated with the data from the response object' do
|
20
|
+
NetSuite::Actions::Get.should_receive(:call).with(NetSuite::Records::Term, :external_id => 1).and_return(response)
|
21
|
+
term = NetSuite::Records::Term.get(:external_id => 1)
|
22
|
+
term.should be_kind_of(NetSuite::Records::Term)
|
23
|
+
term.name.should eql('Term 1')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'when the response is unsuccessful' do
|
28
|
+
let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
|
29
|
+
|
30
|
+
it 'raises a RecordNotFound exception' do
|
31
|
+
NetSuite::Actions::Get.should_receive(:call).with(NetSuite::Records::Term, :external_id => 1).and_return(response)
|
32
|
+
lambda {
|
33
|
+
NetSuite::Records::Term.get(:external_id => 1)
|
34
|
+
}.should raise_error(NetSuite::RecordNotFound,
|
35
|
+
/NetSuite::Records::Term with OPTIONS=(.*) could not be found/)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe '#add' do
|
41
|
+
let(:test_data) { { :name => 'Test Term' } }
|
42
|
+
|
43
|
+
context 'when the response is successful' do
|
44
|
+
let(:response) { NetSuite::Response.new(:success => true, :body => { :internal_id => '1' }) }
|
45
|
+
|
46
|
+
it 'returns true' do
|
47
|
+
term = NetSuite::Records::Term.new(test_data)
|
48
|
+
NetSuite::Actions::Add.should_receive(:call).
|
49
|
+
with(term).
|
50
|
+
and_return(response)
|
51
|
+
term.add.should be_true
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context 'when the response is unsuccessful' do
|
56
|
+
let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
|
57
|
+
|
58
|
+
it 'returns false' do
|
59
|
+
term = NetSuite::Records::Term.new(test_data)
|
60
|
+
NetSuite::Actions::Add.should_receive(:call).
|
61
|
+
with(term).
|
62
|
+
and_return(response)
|
63
|
+
term.add.should be_false
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
describe '#delete' do
|
69
|
+
let(:test_data) { { :internal_id => '1' } }
|
70
|
+
|
71
|
+
context 'when the response is successful' do
|
72
|
+
let(:response) { NetSuite::Response.new(:success => true, :body => { :internal_id => '1' }) }
|
73
|
+
|
74
|
+
it 'returns true' do
|
75
|
+
term = NetSuite::Records::Term.new(test_data)
|
76
|
+
NetSuite::Actions::Delete.should_receive(:call).
|
77
|
+
with(term).
|
78
|
+
and_return(response)
|
79
|
+
term.delete.should be_true
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
context 'when the response is unsuccessful' do
|
84
|
+
let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
|
85
|
+
|
86
|
+
it 'returns false' do
|
87
|
+
term = NetSuite::Records::Term.new(test_data)
|
88
|
+
NetSuite::Actions::Delete.should_receive(:call).
|
89
|
+
with(term).
|
90
|
+
and_return(response)
|
91
|
+
term.delete.should be_false
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
-
|
3
|
-
require 'netsuite'
|
1
|
+
$LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..') ))
|
2
|
+
|
4
3
|
require 'rspec'
|
5
4
|
require 'rspec/autorun'
|
5
|
+
require 'netsuite'
|
6
6
|
require 'savon_spec'
|
7
7
|
|
8
8
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
metadata
CHANGED
@@ -1,115 +1,108 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: netsuite
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.48
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 47
|
10
|
-
version: 0.0.47
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Ryan Moran
|
9
|
+
- Michael Bianco
|
14
10
|
autorequire:
|
15
11
|
bindir: bin
|
16
12
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2012-10-05 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
22
16
|
name: savon
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
25
18
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
- 9
|
33
|
-
- 9
|
34
|
-
version: 0.9.9
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.2.0
|
35
23
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: nokogiri
|
39
24
|
prerelease: false
|
40
|
-
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ~>
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: 1.2.0
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: nokogiri
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
41
34
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
version: "0"
|
35
|
+
requirements:
|
36
|
+
- - ~>
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: 1.5.0
|
49
39
|
type: :runtime
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: rspec
|
53
40
|
prerelease: false
|
54
|
-
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ~>
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.5.0
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
55
50
|
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
segments:
|
61
|
-
- 2
|
62
|
-
- 8
|
63
|
-
- 0
|
64
|
-
version: 2.8.0
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.10'
|
65
55
|
type: :development
|
66
|
-
version_requirements: *id003
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: autotest-standalone
|
69
56
|
prerelease: false
|
70
|
-
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
58
|
none: false
|
72
|
-
requirements:
|
73
|
-
- -
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
|
76
|
-
|
77
|
-
- 4
|
78
|
-
- 5
|
79
|
-
- 9
|
80
|
-
version: 4.5.9
|
81
|
-
type: :development
|
82
|
-
version_requirements: *id004
|
83
|
-
- !ruby/object:Gem::Dependency
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '2.10'
|
63
|
+
- !ruby/object:Gem::Dependency
|
84
64
|
name: savon_spec
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ~>
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 1.3.0
|
71
|
+
type: :development
|
85
72
|
prerelease: false
|
86
|
-
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
87
74
|
none: false
|
88
|
-
requirements:
|
89
|
-
- -
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
75
|
+
requirements:
|
76
|
+
- - ~>
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 1.3.0
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: autotest-standalone
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ~>
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '4.5'
|
97
87
|
type: :development
|
98
|
-
|
88
|
+
prerelease: false
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ~>
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '4.5'
|
99
95
|
description: NetSuite SuiteTalk API Wrapper
|
100
|
-
email:
|
96
|
+
email:
|
101
97
|
- ryan.moran@gmail.com
|
98
|
+
- info@cliffsidedev.com
|
102
99
|
executables: []
|
103
|
-
|
104
100
|
extensions: []
|
105
|
-
|
106
101
|
extra_rdoc_files: []
|
107
|
-
|
108
|
-
files:
|
102
|
+
files:
|
109
103
|
- .autotest
|
110
104
|
- .gitignore
|
111
105
|
- .rspec
|
112
|
-
- .rvmrc
|
113
106
|
- Gemfile
|
114
107
|
- LICENSE
|
115
108
|
- README.md
|
@@ -121,6 +114,7 @@ files:
|
|
121
114
|
- lib/netsuite/actions/initialize.rb
|
122
115
|
- lib/netsuite/actions/update.rb
|
123
116
|
- lib/netsuite/configuration.rb
|
117
|
+
- lib/netsuite/core_ext/string/lower_camelcase.rb
|
124
118
|
- lib/netsuite/errors.rb
|
125
119
|
- lib/netsuite/namespaces/list_acct.rb
|
126
120
|
- lib/netsuite/namespaces/list_rel.rb
|
@@ -132,6 +126,7 @@ files:
|
|
132
126
|
- lib/netsuite/namespaces/tran_sales.rb
|
133
127
|
- lib/netsuite/records/account.rb
|
134
128
|
- lib/netsuite/records/accounting_period.rb
|
129
|
+
- lib/netsuite/records/assembly_item.rb
|
135
130
|
- lib/netsuite/records/bill_address.rb
|
136
131
|
- lib/netsuite/records/classification.rb
|
137
132
|
- lib/netsuite/records/credit_memo.rb
|
@@ -153,6 +148,7 @@ files:
|
|
153
148
|
- lib/netsuite/records/customer_refund_apply_list.rb
|
154
149
|
- lib/netsuite/records/customer_refund_deposit.rb
|
155
150
|
- lib/netsuite/records/customer_refund_deposit_list.rb
|
151
|
+
- lib/netsuite/records/department.rb
|
156
152
|
- lib/netsuite/records/duration.rb
|
157
153
|
- lib/netsuite/records/inventory_item.rb
|
158
154
|
- lib/netsuite/records/invoice.rb
|
@@ -165,9 +161,11 @@ files:
|
|
165
161
|
- lib/netsuite/records/location.rb
|
166
162
|
- lib/netsuite/records/non_inventory_sale_item.rb
|
167
163
|
- lib/netsuite/records/payment_method.rb
|
164
|
+
- lib/netsuite/records/pricing_matrix.rb
|
168
165
|
- lib/netsuite/records/record_ref.rb
|
169
166
|
- lib/netsuite/records/rev_rec_template.rb
|
170
167
|
- lib/netsuite/records/ship_address.rb
|
168
|
+
- lib/netsuite/records/term.rb
|
171
169
|
- lib/netsuite/response.rb
|
172
170
|
- lib/netsuite/support/actions.rb
|
173
171
|
- lib/netsuite/support/attributes.rb
|
@@ -207,6 +205,7 @@ files:
|
|
207
205
|
- spec/netsuite/records/customer_refund_deposit_spec.rb
|
208
206
|
- spec/netsuite/records/customer_refund_spec.rb
|
209
207
|
- spec/netsuite/records/customer_spec.rb
|
208
|
+
- spec/netsuite/records/department_spec.rb
|
210
209
|
- spec/netsuite/records/duration_spec.rb
|
211
210
|
- spec/netsuite/records/inventory_item_spec.rb
|
212
211
|
- spec/netsuite/records/invoice_item_list_spec.rb
|
@@ -222,6 +221,7 @@ files:
|
|
222
221
|
- spec/netsuite/records/record_ref_spec.rb
|
223
222
|
- spec/netsuite/records/rev_rec_template_spec.rb
|
224
223
|
- spec/netsuite/records/ship_address_spec.rb
|
224
|
+
- spec/netsuite/records/term_spec.rb
|
225
225
|
- spec/netsuite/response_spec.rb
|
226
226
|
- spec/netsuite/support/actions_spec.rb
|
227
227
|
- spec/netsuite/support/attributes_spec.rb
|
@@ -246,41 +246,31 @@ files:
|
|
246
246
|
- spec/support/savon.rb
|
247
247
|
- wsdl/2011_2.wsdl
|
248
248
|
- wsdl/2012_1.wsdl
|
249
|
-
has_rdoc: true
|
250
249
|
homepage: https://github.com/RevolutionPrep/netsuite
|
251
250
|
licenses: []
|
252
|
-
|
253
251
|
post_install_message:
|
254
252
|
rdoc_options: []
|
255
|
-
|
256
|
-
require_paths:
|
253
|
+
require_paths:
|
257
254
|
- lib
|
258
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
255
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
259
256
|
none: false
|
260
|
-
requirements:
|
261
|
-
- -
|
262
|
-
- !ruby/object:Gem::Version
|
263
|
-
|
264
|
-
|
265
|
-
- 0
|
266
|
-
version: "0"
|
267
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
257
|
+
requirements:
|
258
|
+
- - ! '>='
|
259
|
+
- !ruby/object:Gem::Version
|
260
|
+
version: '0'
|
261
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
268
262
|
none: false
|
269
|
-
requirements:
|
270
|
-
- -
|
271
|
-
- !ruby/object:Gem::Version
|
272
|
-
|
273
|
-
segments:
|
274
|
-
- 0
|
275
|
-
version: "0"
|
263
|
+
requirements:
|
264
|
+
- - ! '>='
|
265
|
+
- !ruby/object:Gem::Version
|
266
|
+
version: '0'
|
276
267
|
requirements: []
|
277
|
-
|
278
268
|
rubyforge_project:
|
279
|
-
rubygems_version: 1.
|
269
|
+
rubygems_version: 1.8.24
|
280
270
|
signing_key:
|
281
271
|
specification_version: 3
|
282
272
|
summary: NetSuite SuiteTalk API Wrapper
|
283
|
-
test_files:
|
273
|
+
test_files:
|
284
274
|
- spec/netsuite/actions/add_spec.rb
|
285
275
|
- spec/netsuite/actions/delete_spec.rb
|
286
276
|
- spec/netsuite/actions/get_spec.rb
|
@@ -310,6 +300,7 @@ test_files:
|
|
310
300
|
- spec/netsuite/records/customer_refund_deposit_spec.rb
|
311
301
|
- spec/netsuite/records/customer_refund_spec.rb
|
312
302
|
- spec/netsuite/records/customer_spec.rb
|
303
|
+
- spec/netsuite/records/department_spec.rb
|
313
304
|
- spec/netsuite/records/duration_spec.rb
|
314
305
|
- spec/netsuite/records/inventory_item_spec.rb
|
315
306
|
- spec/netsuite/records/invoice_item_list_spec.rb
|
@@ -325,6 +316,7 @@ test_files:
|
|
325
316
|
- spec/netsuite/records/record_ref_spec.rb
|
326
317
|
- spec/netsuite/records/rev_rec_template_spec.rb
|
327
318
|
- spec/netsuite/records/ship_address_spec.rb
|
319
|
+
- spec/netsuite/records/term_spec.rb
|
328
320
|
- spec/netsuite/response_spec.rb
|
329
321
|
- spec/netsuite/support/actions_spec.rb
|
330
322
|
- spec/netsuite/support/attributes_spec.rb
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use ree-1.8.7-2010.02@netsuite --create
|