netsuite 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODM0NWE1NmM1YmUwMDU0YzJkZWE3ZWNjYmRhZGRlMDc0MzBjZjkwZg==
4
+ ODJmNDM3OWYyMGRlNGJkMDU0Nzk1YWUzNGNhNDEyMTk1Y2JmNzg2Yw==
5
5
  data.tar.gz: !binary |-
6
- M2Q3ZDkwZmJhYjg0ZDlhYWI3MTgyYTM0NTZjMDY0YjY5OTk5YjE4Yg==
6
+ ZWMyNGQ1NTBkNDZmNzJkNGM0NmNiZGJiMDA4NjE3NTRiOWMyYmJhOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTY0ZjU1Mjc4MzVkNTE3YzE1Yjk3Njc1ZDhhZjM5NzYxNjZiNDMyNzhjN2Nh
10
- NzEyNDZhOTk2ZDJjZmIxM2VmNmI2ZGU1YjdmMjU0ZGNjY2VlNTQzOTE0ZTc1
11
- ZGU0OWExNjAwZTQ2MWJhYTU5NzY5ZmU2MjA3YTE2MTU1OGE5YTE=
9
+ Yzg4YzU5ODc0ZWE1NDFjNjU1M2FhNDc3MmU4ZDY3NmMzNjMxZDJmZmI3NjM1
10
+ ZmQ5OGM1ODc3ODRkZDFkODQxYWM5OTZiYzAzMmM5ZDUxZTYwMGFiYjA5ODJm
11
+ OGYyMWQxYTdlM2QyOTgzNzlkOWQ1MjY0Mjg2NzdlNDUxMGZlZDI=
12
12
  data.tar.gz: !binary |-
13
- ZmIxOTE1MGZjNmI3NTlkMDZjZGM2ZjhhYmQzYjczZDA3NjAzZTc4NzgxZGU5
14
- ZmI4Y2UyMjc1ZTJhYWViOWNlYjgxMjc0MmE1NTFiMTkzODVjMjgzNWEzYTYx
15
- NDYyYmU1NGQ0N2YyNzYwZWY3ZWM5YjA2NTg0NmI3ZmIzNTk5Yjk=
13
+ ZGIxOWEyYzE4ODUwMmFkYzhkMzIxZTI0YWIwYTBkYTRhMzczY2MxZmNhYzgz
14
+ MTcxNjI1YjBlYmNhM2RhMmEzMmY5NGE1NTNmMGFhZTE2MGYzM2M5YWEyMTg5
15
+ NGMwYzdlN2QwNTc1Y2JhNTU5NjA0NGM5ZWVkZjc4ZjZjMDU1YmY=
data/Gemfile CHANGED
@@ -1,5 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
- gem 'pry-nav'
5
- gem 'pry-rescue'
4
+ gem 'pry-nav'
@@ -165,6 +165,7 @@ module NetSuite
165
165
  autoload :SalesOrderItem, 'netsuite/records/sales_order_item'
166
166
  autoload :SalesOrderItemList, 'netsuite/records/sales_order_item_list'
167
167
  autoload :SalesTaxItem, 'netsuite/records/sales_tax_item'
168
+ autoload :ServiceResaleItem, 'netsuite/records/service_resale_item'
168
169
  autoload :ServiceSaleItem, 'netsuite/records/service_sale_item'
169
170
  autoload :ShipAddress, 'netsuite/records/ship_address'
170
171
  autoload :SiteCategory, 'netsuite/records/site_category'
@@ -153,9 +153,7 @@ module NetSuite
153
153
  if email
154
154
  self.email = email
155
155
  else
156
- attributes[:email] ||
157
- raise(ConfigurationError,
158
- '#email is a required configuration value. Please set it by calling NetSuite::Configuration.email = "me@example.com"')
156
+ attributes[:email]
159
157
  end
160
158
  end
161
159
 
@@ -167,9 +165,7 @@ module NetSuite
167
165
  if password
168
166
  self.password = password
169
167
  else
170
- attributes[:password] ||
171
- raise(ConfigurationError,
172
- '#password is a required configuration value. Please set it by calling NetSuite::Configuration.password = "my_pass"')
168
+ attributes[:password]
173
169
  end
174
170
  end
175
171
 
@@ -181,9 +177,7 @@ module NetSuite
181
177
  if account
182
178
  self.account = account
183
179
  else
184
- attributes[:account] ||
185
- raise(ConfigurationError,
186
- '#account is a required configuration value. Please set it by calling NetSuite::Configuration.account = 1234')
180
+ attributes[:account]
187
181
  end
188
182
  end
189
183
 
@@ -9,12 +9,12 @@ module NetSuite
9
9
 
10
10
  actions :add, :get, :delete, :initialize, :upsert
11
11
 
12
- fields :tran_date, :to_be_emailed, :memo, :total
12
+ fields :tran_date, :to_be_emailed, :memo, :total, :currency_name, :exchange_rate, :source, :tax_rate
13
13
 
14
14
  field :item_list, CashRefundItemList
15
15
  field :custom_field_list, CustomFieldList
16
16
 
17
- record_refs :entity, :custom_form, :payment_method, :created_from
17
+ record_refs :entity, :custom_form, :payment_method, :created_from, :account, :currency, :posting_period
18
18
 
19
19
  attr_reader :internal_id
20
20
  attr_accessor :external_id
@@ -5,9 +5,9 @@ module NetSuite
5
5
  include Support::RecordRefs
6
6
  include Support::Records
7
7
  include Support::Actions
8
- include Namespaces::TranGeneral
8
+ include Namespaces::TranSales
9
9
 
10
- actions :get, :get_list, :add, :delete, :upsert
10
+ actions :get, :get_list, :add, :delete, :search, :upsert
11
11
 
12
12
  fields :approved, :created_date, :exchange_rate, :last_modified_date, :reversal_date, :reversal_defer, :reversal_entry,
13
13
  :tran_date, :tran_id
@@ -35,6 +35,10 @@ module NetSuite
35
35
  rec
36
36
  end
37
37
 
38
+ def self.search_class_name
39
+ "Transaction"
40
+ end
41
+
38
42
  end
39
43
  end
40
44
  end
@@ -0,0 +1,49 @@
1
+ module NetSuite
2
+ module Records
3
+ class ServiceResaleItem
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Support::Actions
8
+ include Namespaces::ListAcct
9
+
10
+ actions :get, :get_list, :add, :update, :delete, :upsert, :search
11
+
12
+ fields :available_to_partners, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :create_job, :created_date,
13
+ :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap, :featured_description,
14
+ :include_children, :is_donation_item, :is_fulfillable, :is_gco_compliant, :is_inactive, :is_online, :is_taxable,
15
+ :item_id, :last_modified_date, :matrix_option_list, :matrix_type, :max_donation_amount, :meta_tag_html,
16
+ :minimum_quantity, :minimum_quantity_units, :no_price_message, :offer_support, :on_special, :out_of_stock_behavior,
17
+ :out_of_stock_message, :overall_quantity_pricing_type, :page_title, :presentation_item_list, :prices_include_tax,
18
+ :pricing_matrix, :rate, :related_items_description, :sales_description, :search_keywords,
19
+ :show_default_donation_amount, :site_category_list, :sitemap_priority, :soft_descriptor, :specials_description,
20
+ :store_description, :store_detailed_description, :store_display_name, :translations_list, :upc_code, :url_component,
21
+ :use_marginal_rates, :vsoe_deferral, :vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :vsoe_sop_group
22
+
23
+ # item_task_templates_list
24
+ # billing_rates_matrix -- RecordRef, via listAcct::ItemOptionsList
25
+
26
+ record_refs :billing_schedule, :cost_category, :custom_form, :deferred_revenue_account, :department, :income_account,
27
+ :issue_product, :item_options_list, :klass, :location, :parent, :pricing_group, :purchase_tax_code,
28
+ :quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :store_display_image,
29
+ :store_display_thumbnail, :store_item_template, :subsidiary_list, :tax_schedule, :units_type
30
+
31
+ field :pricing_matrix, PricingMatrix
32
+ field :custom_field_list, CustomFieldList
33
+
34
+ attr_reader :internal_id
35
+ attr_accessor :external_id
36
+
37
+ def initialize(attributes = {})
38
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
39
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
40
+ initialize_from_attributes_hash(attributes)
41
+ end
42
+
43
+ def self.search_class_name
44
+ "Item"
45
+ end
46
+
47
+ end
48
+ end
49
+ end
@@ -7,7 +7,7 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListAcct
9
9
 
10
- actions :get, :get_list, :add, :update, :delete, :upsert
10
+ actions :get, :get_list, :add, :update, :delete, :upsert, :search
11
11
 
12
12
  fields :available_to_partners, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :create_job, :created_date,
13
13
  :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap, :featured_description,
@@ -41,6 +41,10 @@ module NetSuite
41
41
  initialize_from_attributes_hash(attributes)
42
42
  end
43
43
 
44
+ def self.search_class_name
45
+ "Item"
46
+ end
47
+
44
48
  end
45
49
  end
46
50
  end
@@ -1,3 +1,3 @@
1
1
  module Netsuite
2
- VERSION = '0.4.6'
2
+ VERSION = '0.4.7'
3
3
  end
@@ -116,10 +116,7 @@ describe NetSuite::Configuration do
116
116
 
117
117
  context 'when the email has not been set' do
118
118
  it 'raises a ConfigurationError' do
119
- expect {
120
- config.email
121
- }.to raise_error(NetSuite::ConfigurationError,
122
- '#email is a required configuration value. Please set it by calling NetSuite::Configuration.email = "me@example.com"')
119
+ expect(config.email).to be_nil
123
120
  end
124
121
  end
125
122
  end
@@ -137,10 +134,7 @@ describe NetSuite::Configuration do
137
134
 
138
135
  context 'when the password has not been set' do
139
136
  it 'raises a ConfigurationError' do
140
- expect {
141
- config.password
142
- }.to raise_error(NetSuite::ConfigurationError,
143
- '#password is a required configuration value. Please set it by calling NetSuite::Configuration.password = "my_pass"')
137
+ expect(config.password).to be_nil
144
138
  end
145
139
  end
146
140
  end
@@ -158,10 +152,7 @@ describe NetSuite::Configuration do
158
152
 
159
153
  context 'when the account has not been set' do
160
154
  it 'raises a ConfigurationError' do
161
- expect {
162
- config.account
163
- }.to raise_error(NetSuite::ConfigurationError,
164
- '#account is a required configuration value. Please set it by calling NetSuite::Configuration.account = 1234')
155
+ expect(config.account).to be_nil
165
156
  end
166
157
  end
167
158
  end
@@ -141,15 +141,15 @@ describe NetSuite::Records::JournalEntry do
141
141
 
142
142
  it 'returns a hash of attributes that can be used in a SOAP request' do
143
143
  expect(entry.to_record).to eql({
144
- 'tranGeneral:tranId' => '1234',
145
- 'tranGeneral:approved' => true
144
+ 'tranSales:tranId' => '1234',
145
+ 'tranSales:approved' => true
146
146
  })
147
147
  end
148
148
  end
149
149
 
150
150
  describe '#record_type' do
151
151
  it 'returns a string type for the record to be used in a SOAP request' do
152
- expect(entry.record_type).to eql('tranGeneral:JournalEntry')
152
+ expect(entry.record_type).to eql('tranSales:JournalEntry')
153
153
  end
154
154
  end
155
155
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netsuite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Moran
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-16 00:00:00.000000000 Z
12
+ date: 2015-09-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon
@@ -194,6 +194,7 @@ files:
194
194
  - lib/netsuite/records/sales_order_item.rb
195
195
  - lib/netsuite/records/sales_order_item_list.rb
196
196
  - lib/netsuite/records/sales_tax_item.rb
197
+ - lib/netsuite/records/service_resale_item.rb
197
198
  - lib/netsuite/records/service_sale_item.rb
198
199
  - lib/netsuite/records/ship_address.rb
199
200
  - lib/netsuite/records/site_category.rb