netsuite 0.7.0 → 0.7.1

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 CHANGED
@@ -84,6 +84,9 @@ NetSuite.configure do
84
84
  consumer_secret ENV['NETSUITE_CONSUMER_SECRET']
85
85
  token_id ENV['NETSUITE_TOKEN_ID']
86
86
  token_secret ENV['NETSUITE_TOKEN_SECRET']
87
+
88
+ # oauth does not work with API versions less than 2015_2
89
+ api_version '2015_2'
87
90
  end
88
91
  ```
89
92
 
@@ -221,6 +221,13 @@ module NetSuite
221
221
  autoload :VendorBillItem, 'netsuite/records/vendor_bill_item'
222
222
  autoload :VendorBillItemList, 'netsuite/records/vendor_bill_item_list'
223
223
  autoload :VendorCategory, 'netsuite/records/vendor_category'
224
+ autoload :VendorCredit, 'netsuite/records/vendor_credit'
225
+ autoload :VendorCreditApply, 'netsuite/records/vendor_credit_apply'
226
+ autoload :VendorCreditApplyList, 'netsuite/records/vendor_credit_apply_list'
227
+ autoload :VendorCreditItem, 'netsuite/records/vendor_credit_item'
228
+ autoload :VendorCreditItemList, 'netsuite/records/vendor_credit_item_list'
229
+ autoload :VendorCreditExpense, 'netsuite/records/vendor_credit_expense'
230
+ autoload :VendorCreditExpenseList, 'netsuite/records/vendor_credit_expense_list'
224
231
  autoload :VendorPayment, 'netsuite/records/vendor_payment'
225
232
  autoload :VendorPaymentApply, 'netsuite/records/vendor_payment_apply'
226
233
  autoload :VendorPaymentApplyList, 'netsuite/records/vendor_payment_apply_list'
@@ -7,7 +7,7 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::TranCust
9
9
 
10
- actions :add, :get, :delete, :initialize, :upsert
10
+ actions :add, :get, :delete, :initialize, :upsert, :search
11
11
 
12
12
  fields :tran_id, :tran_date, :to_be_emailed, :memo, :total, :currency_name, :exchange_rate, :source, :tax_rate
13
13
 
@@ -24,6 +24,15 @@ module NetSuite
24
24
  @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
25
25
  initialize_from_attributes_hash(attributes)
26
26
  end
27
+
28
+ def self.search_class_name
29
+ "Transaction"
30
+ end
31
+
32
+ def self.search_class_namespace
33
+ 'tranSales'
34
+ end
35
+
27
36
  end
28
37
  end
29
38
  end
@@ -7,7 +7,7 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::TranBank
9
9
 
10
- actions :get, :get_list, :add, :delete, :upsert, :update
10
+ actions :get, :get_list, :add, :delete, :upsert, :update, :search
11
11
 
12
12
  fields :created_date, :last_modified_date, :currency_name, :exchange_rate, :tran_id, :total, :tran_date, :memo, :to_be_printed
13
13
 
@@ -27,6 +27,14 @@ module NetSuite
27
27
  initialize_from_attributes_hash(attributes)
28
28
  end
29
29
 
30
+ def self.search_class_name
31
+ "Transaction"
32
+ end
33
+
34
+ def self.search_class_namespace
35
+ 'tranSales'
36
+ end
37
+
30
38
  end
31
39
  end
32
40
  end
@@ -9,7 +9,7 @@ module NetSuite
9
9
 
10
10
  actions :get, :get_list, :add, :delete, :upsert, :search
11
11
 
12
- fields :due_next_month_if_within_days, :name, :date_driven, :days_until_expiry, :days_until_next_due,
12
+ fields :due_next_month_if_within_days, :name, :date_driven, :days_until_expiry, :days_until_net_due,
13
13
  :day_discount_expires, :day_of_month_net_due, :discount_percent, :discount_percent_date_driven, :is_inactive,
14
14
  :preferred
15
15
 
@@ -0,0 +1,52 @@
1
+ module NetSuite
2
+ module Records
3
+ class VendorCredit
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Support::Actions
8
+ include Namespaces::TranPurch
9
+
10
+ actions :get, :get_list, :delete, :initialize, :search
11
+
12
+ fields :created_date, :un_applied, :last_modified_date,
13
+ :auto_apply, :applied, :transaction_number,
14
+ :tran_id, :total, :user_total,
15
+ :currency_name, :tran_date, :exchange_rate,
16
+ :memo
17
+
18
+ field :custom_form, RecordRef
19
+ field :account, RecordRef
20
+ field :bill_address_list, RecordRef
21
+ field :created_from, RecordRef
22
+ field :entity, RecordRef
23
+ field :currency, RecordRef
24
+ field :posting_period, RecordRef
25
+ field :department, RecordRef
26
+ field :klass, RecordRef
27
+ field :location, RecordRef
28
+ field :subsidiary, RecordRef
29
+ field :billing_address, Address
30
+ field :expense_list, VendorCreditExpenseList
31
+ field :item_list, VendorCreditItemList
32
+ field :apply_list, VendorCreditApplyList
33
+ field :custom_field_list, CustomFieldList
34
+
35
+ attr_reader :internal_id
36
+
37
+ def initialize(attributes = {})
38
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
39
+ initialize_from_attributes_hash(attributes)
40
+ end
41
+
42
+ def self.search_class_name
43
+ "Transaction"
44
+ end
45
+
46
+ def self.search_class_namespace
47
+ 'tranSales'
48
+ end
49
+
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,18 @@
1
+ module NetSuite
2
+ module Records
3
+ class VendorCreditApply
4
+ include Support::Fields
5
+ include Support::Records
6
+ include Namespaces::TranPurch
7
+
8
+ fields :apply, :apply_date, :doc,
9
+ :line, :type, :total,
10
+ :due, :currency, :amount
11
+
12
+ def initialize(attributes = {})
13
+ initialize_from_attributes_hash(attributes)
14
+ end
15
+
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,12 @@
1
+ module NetSuite
2
+ module Records
3
+ class VendorCreditApplyList < Support::Sublist
4
+ include Namespaces::TranPurch
5
+
6
+ sublist :apply, VendorCreditApply
7
+
8
+ alias :applies :apply
9
+
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,31 @@
1
+ module NetSuite
2
+ module Records
3
+ class VendorCreditExpense
4
+ include Support::Fields
5
+ include Support::Records
6
+ include Namespaces::TranPurch
7
+
8
+ fields :order_line, :line, :amount,
9
+ :tax_rate1, :tax_rate2, :tax1_amt,
10
+ :gross_amt, :memo, :is_billable,
11
+ :amortiz_start_date,
12
+ :amortization_end_date,
13
+ :amortization_residual
14
+
15
+ field :category, RecordRef
16
+ field :taxCode, RecordRef
17
+ field :account, RecordRef
18
+ field :department, RecordRef
19
+ field :klass, RecordRef
20
+ field :amortizationSched, RecordRef
21
+ field :location, RecordRef
22
+ field :customer, RecordRef
23
+ field :custom_field_list, CustomFieldList
24
+
25
+ def initialize(attributes = {})
26
+ initialize_from_attributes_hash(attributes)
27
+ end
28
+
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,12 @@
1
+ module NetSuite
2
+ module Records
3
+ class VendorCreditExpenseList < Support::Sublist
4
+ include Namespaces::TranPurch
5
+
6
+ sublist :expense, VendorCreditExpense
7
+
8
+ alias :expenses :expense
9
+
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,34 @@
1
+ module NetSuite
2
+ module Records
3
+ class VendorCreditItem
4
+ include Support::Fields
5
+ include Support::Records
6
+ include Namespaces::TranPurch
7
+
8
+ fields :vendor_name, :line, :order_line,
9
+ :quantity, :description, :rate,
10
+ :amount, :bin_numbers, :tax_rate1,
11
+ :tax_rate2, :gross_amt, :tax1_amt,
12
+ :klass, :is_billable, :amortization_sched,
13
+ :amortiz_start_date,
14
+ :amortization_end_date,
15
+ :amortization_residual
16
+
17
+ field :item, RecordRef
18
+ field :units, RecordRef
19
+ field :department, RecordRef
20
+ field :customer, RecordRef
21
+ field :location, RecordRef
22
+ field :tax_code, RecordRef
23
+ field :serial_numbers_list, RecordRefList
24
+ field :inventory_detail, InventoryDetail
25
+ field :custom_field_list, CustomFieldList
26
+ field :options, CustomFieldList
27
+
28
+ def initialize(attributes = {})
29
+ initialize_from_attributes_hash(attributes)
30
+ end
31
+
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,12 @@
1
+ module NetSuite
2
+ module Records
3
+ class VendorCreditItemList < Support::Sublist
4
+ include Namespaces::TranPurch
5
+
6
+ sublist :item, VendorCreditItem
7
+
8
+ alias :items :item
9
+
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module Netsuite
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
@@ -12,6 +12,7 @@ describe 'basic records' do
12
12
  NetSuite::Records::PayrollItem,
13
13
  NetSuite::Records::Opportunity,
14
14
  NetSuite::Records::VendorCategory,
15
+ NetSuite::Records::VendorCredit,
15
16
  NetSuite::Records::VendorBill,
16
17
  NetSuite::Records::Deposit,
17
18
  NetSuite::Records::RevRecTemplate,
@@ -5,7 +5,7 @@ describe NetSuite::Records::Term do
5
5
 
6
6
  it 'has all the right fields' do
7
7
  [
8
- :name, :date_driven, :days_until_next_due, :discount_percent, :days_until_expiry, :day_of_month_net_due,
8
+ :name, :date_driven, :days_until_net_due, :discount_percent, :days_until_expiry, :day_of_month_net_due,
9
9
  :due_next_month_if_within_days, :discount_percent_date_driven, :day_discount_expires, :preferred, :is_inactive
10
10
  ].each do |field|
11
11
  expect(term).to have_field(field)
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.7.0
4
+ version: 0.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-08-10 00:00:00.000000000 Z
13
+ date: 2016-08-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: savon
@@ -259,6 +259,13 @@ files:
259
259
  - lib/netsuite/records/vendor_bill_item.rb
260
260
  - lib/netsuite/records/vendor_bill_item_list.rb
261
261
  - lib/netsuite/records/vendor_category.rb
262
+ - lib/netsuite/records/vendor_credit.rb
263
+ - lib/netsuite/records/vendor_credit_apply.rb
264
+ - lib/netsuite/records/vendor_credit_apply_list.rb
265
+ - lib/netsuite/records/vendor_credit_expense.rb
266
+ - lib/netsuite/records/vendor_credit_expense_list.rb
267
+ - lib/netsuite/records/vendor_credit_item.rb
268
+ - lib/netsuite/records/vendor_credit_item_list.rb
262
269
  - lib/netsuite/records/vendor_payment.rb
263
270
  - lib/netsuite/records/vendor_payment_apply.rb
264
271
  - lib/netsuite/records/vendor_payment_apply_list.rb