netsuite 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,10 +16,12 @@ require 'netsuite/actions/get'
16
16
  require 'netsuite/actions/initialize'
17
17
 
18
18
  # RECORDS
19
+ require 'netsuite/records/bill_address'
19
20
  require 'netsuite/records/customer'
20
21
  require 'netsuite/records/customer_addressbook_list'
21
22
  require 'netsuite/records/invoice'
22
23
  require 'netsuite/records/record_ref'
24
+ require 'netsuite/records/ship_address'
23
25
 
24
26
  module NetSuite
25
27
 
@@ -3,8 +3,9 @@ module NetSuite
3
3
  class Get
4
4
  include SavonSupport
5
5
 
6
- def initialize(id)
7
- @id = id
6
+ def initialize(id, klass)
7
+ @id = id
8
+ @klass = klass
8
9
  end
9
10
 
10
11
  private
@@ -18,6 +19,10 @@ module NetSuite
18
19
  end
19
20
  end
20
21
 
22
+ def soap_type
23
+ @klass.to_s.split('::').last.lower_camelcase
24
+ end
25
+
21
26
  # <soap:Body>
22
27
  # <platformMsgs:get>
23
28
  # <platformMsgs:baseRef internalId="983" type="customer" xsi:type="platformCore:RecordRef">
@@ -31,7 +36,7 @@ module NetSuite
31
36
  :attributes! => {
32
37
  'platformMsgs:baseRef' => {
33
38
  :internalId => @id,
34
- :type => 'customer',
39
+ :type => soap_type,
35
40
  'xsi:type' => 'platformCore:RecordRef'
36
41
  }
37
42
  }
@@ -0,0 +1,15 @@
1
+ module NetSuite
2
+ module Records
3
+ class BillAddress
4
+ include FieldSupport
5
+
6
+ fields :bill_attention, :bill_addressee, :bill_phone, :bill_addr1, :bill_addr2,
7
+ :bill_addr3, :bill_city, :bill_state, :bill_zip, :bill_country
8
+
9
+ def initialize(attrs = {})
10
+ initialize_from_attributes_hash(attrs)
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -37,7 +37,7 @@ module NetSuite
37
37
  end
38
38
 
39
39
  def self.get(id)
40
- response = Actions::Get.call(id)
40
+ response = Actions::Get.call(id, self)
41
41
  if response.success?
42
42
  new(response.body)
43
43
  else
@@ -31,11 +31,28 @@ module NetSuite
31
31
  record_refs :account, :bill_address_list, :custom_form, :entity, :posting_period, :ship_address_list
32
32
 
33
33
  def initialize(attributes = {})
34
- @internal_id = attributes.delete(:internal_id)
35
- @external_id = attributes.delete(:external_id)
34
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
35
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
36
36
  initialize_from_attributes_hash(attributes)
37
37
  end
38
38
 
39
+ def transaction_bill_address=(attrs)
40
+ attributes[:transaction_bill_address] = BillAddress.new(attrs)
41
+ end
42
+
43
+ def transaction_ship_address=(attrs)
44
+ attributes[:transaction_ship_address] = ShipAddress.new(attrs)
45
+ end
46
+
47
+ def self.get(id)
48
+ response = Actions::Get.call(id, self)
49
+ if response.success?
50
+ new(response.body)
51
+ else
52
+ raise RecordNotFound, "#{self} with ID=#{id} could not be found"
53
+ end
54
+ end
55
+
39
56
  def self.initialize(customer)
40
57
  response = Actions::Initialize.call(customer)
41
58
  if response.success?
@@ -0,0 +1,15 @@
1
+ module NetSuite
2
+ module Records
3
+ class ShipAddress
4
+ include FieldSupport
5
+
6
+ fields :ship_attention, :ship_addressee, :ship_phone, :ship_addr1, :ship_addr2,
7
+ :ship_addr3, :ship_city, :ship_state, :ship_zip, :ship_country, :ship_is_residential
8
+
9
+ def initialize(attrs = {})
10
+ initialize_from_attributes_hash(attrs)
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module Netsuite
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
@@ -2,26 +2,52 @@ require 'spec_helper'
2
2
 
3
3
  describe NetSuite::Actions::Get do
4
4
 
5
- before do
6
- savon.expects(:get).with({
7
- 'platformMsgs:baseRef' => {},
8
- :attributes! => {
9
- 'platformMsgs:baseRef' => {
10
- :internalId => 1,
11
- :type => 'customer',
12
- 'xsi:type' => 'platformCore:RecordRef'
5
+ describe 'Customer' do
6
+ before do
7
+ savon.expects(:get).with({
8
+ 'platformMsgs:baseRef' => {},
9
+ :attributes! => {
10
+ 'platformMsgs:baseRef' => {
11
+ :internalId => 1,
12
+ :type => 'customer',
13
+ 'xsi:type' => 'platformCore:RecordRef'
14
+ }
13
15
  }
14
- }
15
- }).returns(:get_customer)
16
- end
16
+ }).returns(:get_customer)
17
+ end
18
+
19
+ it 'makes a valid request to the NetSuite API' do
20
+ NetSuite::Actions::Get.call(1, NetSuite::Records::Customer)
21
+ end
17
22
 
18
- it 'makes a valid request to the NetSuite API' do
19
- NetSuite::Actions::Get.call(1)
23
+ it 'returns a valid Response object' do
24
+ response = NetSuite::Actions::Get.call(1, NetSuite::Records::Customer)
25
+ response.should be_kind_of(NetSuite::Response)
26
+ end
20
27
  end
21
28
 
22
- it 'returns a valid Response object' do
23
- response = NetSuite::Actions::Get.call(1)
24
- response.should be_kind_of(NetSuite::Response)
29
+ describe 'Invoice' do
30
+ before do
31
+ savon.expects(:get).with({
32
+ 'platformMsgs:baseRef' => {},
33
+ :attributes! => {
34
+ 'platformMsgs:baseRef' => {
35
+ :internalId => 10,
36
+ :type => 'invoice',
37
+ 'xsi:type' => 'platformCore:RecordRef'
38
+ }
39
+ }
40
+ }).returns(:get_invoice)
41
+ end
42
+
43
+ it 'makes a valid request to the NetSuite API' do
44
+ NetSuite::Actions::Get.call(1, NetSuite::Records::Invoice)
45
+ end
46
+
47
+ it 'returns a valid Response object' do
48
+ response = NetSuite::Actions::Get.call(1, NetSuite::Records::Invoice)
49
+ response.should be_kind_of(NetSuite::Response)
50
+ end
25
51
  end
26
52
 
27
53
  end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe NetSuite::Records::BillAddress do
4
+ let(:bill_address) { NetSuite::Records::BillAddress.new }
5
+
6
+ it 'has all the right fields' do
7
+ [
8
+ :bill_attention, :bill_addressee, :bill_phone, :bill_addr1, :bill_addr2,
9
+ :bill_addr3, :bill_city, :bill_state, :bill_zip, :bill_country
10
+ ].each do |field|
11
+ bill_address.should have_field(field)
12
+ end
13
+ end
14
+
15
+ end
@@ -75,7 +75,7 @@ describe NetSuite::Records::Customer do
75
75
  let(:response) { NetSuite::Response.new(:success => true, :body => { :is_person => true }) }
76
76
 
77
77
  it 'returns a Customer instance populated with the data from the response object' do
78
- NetSuite::Actions::Get.should_receive(:call).with(1).and_return(response)
78
+ NetSuite::Actions::Get.should_receive(:call).with(1, NetSuite::Records::Customer).and_return(response)
79
79
  customer = NetSuite::Records::Customer.get(1)
80
80
  customer.should be_kind_of(NetSuite::Records::Customer)
81
81
  customer.is_person.should be_true
@@ -85,8 +85,8 @@ describe NetSuite::Records::Customer do
85
85
  context 'when the response is unsuccessful' do
86
86
  let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
87
87
 
88
- it 'returns a Customer instance populated with the data from the response object' do
89
- NetSuite::Actions::Get.should_receive(:call).with(1).and_return(response)
88
+ it 'raises a RecordNotFound exception' do
89
+ NetSuite::Actions::Get.should_receive(:call).with(1, NetSuite::Records::Customer).and_return(response)
90
90
  lambda {
91
91
  NetSuite::Records::Customer.get(1)
92
92
  }.should raise_error(NetSuite::RecordNotFound, 'NetSuite::Records::Customer with ID=1 could not be found')
@@ -7,25 +7,26 @@ describe NetSuite::Records::Invoice do
7
7
 
8
8
  it 'has all the right fields' do
9
9
  [
10
- :created_date, :last_modified_date, :tran_date, :tran_id, :source, :created_from,
11
- :opportunity, :department, :klass, :terms, :location, :subsidiary, :due_date, :discount_date, :discount_amount, :sales_rep,
12
- :contrib_pct, :partner, :lead_source, :start_date, :end_date, :other_ref_name, :memo, :sales_effective_date,
13
- :exclude_commission, :total_cost_estimate, :est_gross_profit, :est_gross_profit_percent, :rev_rec_schedule,
14
- :rev_rec_start_date, :rev_rec_end_date, :amount_paid, :amount_remaining, :balance, :on_credit_hold,
15
- :exchange_rate, :currency_name, :promo_code, :discount_item, :discount_rate, :is_taxable, :tax_item, :tax_rate,
16
- :to_be_printed, :to_be_emailed, :to_be_faxed, :fax, :message_sel, :message, :transaction_bill_address,
17
- :bill_address, :transaction_ship_address, :ship_address, :fob, :ship_date, :ship_method, :shipping_cost,
18
- :shipping_tax_1_rate, :shipping_tax_2_rate, :shipping_tax_code, :handling_tax_code, :handling_tax_1_rate, :handling_cost,
19
- :handling_tax_2_rate, :tracking_numbers, :linked_tracking_numbers, :sales_group, :sub_total, :revenue_status,
20
- :recognized_revenue, :deferred_revenue, :rev_rec_on_rev_commitment, :sync_sales_teams, :discount_total, :tax_total,
21
- :alt_shipping_cost, :alt_handling_cost, :total, :status, :job, :billing_schedule, :email, :tax_2_total, :vat_reg_num,
22
- :exp_cost_discount, :item_cost_discount, :time_discount, :exp_cost_disc_rate, :item_cost_disc_rate, :time_disc_rate,
23
- :exp_cost_disc_amount, :exp_cost_tax_rate_1, :exp_cost_tax_rate_2, :item_cost_disc_amount, :exp_cost_tax_code,
24
- :exp_cost_disc_tax_1_amt, :item_cost_tax_rate_1, :time_disc_amount, :item_cost_tax_code, :exp_cost_disc_taxable,
25
- :item_cost_disc_taxable, :item_cost_tax_rate_2, :item_cost_disc_tax_1_amt, :item_cost_disc_print, :time_disc_taxable,
26
- :time_tax_rate_1, :exp_cost_disc_print, :time_tax_code, :time_disc_print, :gift_cert_applied, :time_disc_tax_1_amt,
27
- :tran_is_vsoe_bundle, :time_tax_rate_2, :vsoe_auto_calc, :sync_partner_teams, :sales_team_list, :partners_list, :item_list,
28
- :item_cost_list, :gift_cert_redemption_list, :exp_cost_list, :time_list, :ship_group_list, :custom_field_list
10
+ :alt_handling_cost, :alt_shipping_cost, :amount_paid, :amount_remaining, :balance, :bill_address,
11
+ :billing_schedule, :contrib_pct, :created_date, :created_from, :currency_name, :custom_field_list,
12
+ :deferred_revenue, :department, :discount_amount, :discount_date, :discount_item, :discount_rate,
13
+ :discount_total, :due_date, :email, :end_date, :est_gross_profit, :est_gross_profit_percent, :exchange_rate,
14
+ :exclude_commission, :exp_cost_disc_amount, :exp_cost_disc_print, :exp_cost_disc_rate, :exp_cost_disc_tax_1_amt,
15
+ :exp_cost_disc_taxable, :exp_cost_discount, :exp_cost_list, :exp_cost_tax_code, :exp_cost_tax_rate_1,
16
+ :exp_cost_tax_rate_2, :fax, :fob, :gift_cert_applied, :gift_cert_redemption_list, :handling_cost, :handling_tax_1_rate,
17
+ :handling_tax_2_rate, :handling_tax_code, :is_taxable, :item_cost_disc_amount, :item_cost_disc_print,
18
+ :item_cost_disc_rate, :item_cost_disc_tax_1_amt, :item_cost_disc_taxable, :item_cost_discount, :item_cost_list,
19
+ :item_cost_tax_code, :item_cost_tax_rate_1, :item_cost_tax_rate_2, :item_list, :job, :klass, :last_modified_date,
20
+ :lead_source, :linked_tracking_numbers, :location, :memo, :message, :message_sel, :on_credit_hold, :opportunity,
21
+ :other_ref_name, :partner, :partners_list, :promo_code, :recognized_revenue, :rev_rec_end_date,
22
+ :rev_rec_on_rev_commitment, :rev_rec_schedule, :rev_rec_start_date, :revenue_status, :sales_effective_date,
23
+ :sales_group, :sales_rep, :sales_team_list, :ship_address, :ship_date, :ship_group_list,
24
+ :ship_method, :shipping_cost, :shipping_tax_1_rate, :shipping_tax_2_rate, :shipping_tax_code, :source, :start_date,
25
+ :status, :sub_total, :subsidiary, :sync_partner_teams, :sync_sales_teams, :tax_2_total, :tax_item, :tax_rate,
26
+ :tax_total, :terms, :time_disc_amount, :time_disc_print, :time_disc_rate, :time_disc_tax_1_amt, :time_disc_taxable,
27
+ :time_discount, :time_list, :time_tax_code, :time_tax_rate_1, :time_tax_rate_2, :to_be_emailed, :to_be_faxed,
28
+ :to_be_printed, :total, :total_cost_estimate, :tracking_numbers, :tran_date, :tran_id, :tran_is_vsoe_bundle,
29
+ :vat_reg_num, :vsoe_auto_calc
29
30
  ].each do |field|
30
31
  invoice.should have_field(field)
31
32
  end
@@ -34,6 +35,29 @@ describe NetSuite::Records::Invoice do
34
35
  it 'handles the "klass" field correctly'
35
36
  # This field maps to 'class' but cannot be set as such in Ruby as it will cause runtime errors.
36
37
 
38
+ describe '.get' do
39
+ context 'when the response is successful' do
40
+ let(:response) { NetSuite::Response.new(:success => true, :body => { :is_person => true }) }
41
+
42
+ it 'returns an Invoice instance populated with the data from the response object' do
43
+ NetSuite::Actions::Get.should_receive(:call).with(10, NetSuite::Records::Invoice).and_return(response)
44
+ invoice = NetSuite::Records::Invoice.get(10)
45
+ invoice.should be_kind_of(NetSuite::Records::Invoice)
46
+ end
47
+ end
48
+
49
+ context 'when the response is unsuccessful' do
50
+ let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
51
+
52
+ it 'raises a RecordNotFound exception' do
53
+ NetSuite::Actions::Get.should_receive(:call).with(10, NetSuite::Records::Invoice).and_return(response)
54
+ lambda {
55
+ NetSuite::Records::Invoice.get(10)
56
+ }.should raise_error(NetSuite::RecordNotFound, 'NetSuite::Records::Invoice with ID=10 could not be found')
57
+ end
58
+ end
59
+ end
60
+
37
61
  describe '.initialize' do
38
62
  context 'when the request is successful' do
39
63
  it 'returns an initialized invoice from the customer entity' do
@@ -48,6 +72,10 @@ describe NetSuite::Records::Invoice do
48
72
  end
49
73
  end
50
74
 
75
+ describe '#add' do
76
+ pending
77
+ end
78
+
51
79
  describe 'RecordRefs' do
52
80
  describe 'account' do
53
81
  it 'creates a RecordRef for this attribute' do
@@ -116,6 +144,31 @@ describe NetSuite::Records::Invoice do
116
144
  end
117
145
  end
118
146
 
147
+ it 'has a transaction_bill_address field that builds a BillAddress object' do
148
+ invoice.transaction_bill_address = {
149
+ :"@xmlns:platform_common" => 'urn:common_2011_2.platform.webservices.netsuite.com',
150
+ :bill_addr1 => '123 Happy Lane',
151
+ :bill_city => 'Los Angeles',
152
+ :bill_country => '_unitedStates',
153
+ :bill_state => 'CA',
154
+ :bill_zip => '90007'
155
+ }
156
+ invoice.transaction_bill_address.should be_kind_of(NetSuite::Records::BillAddress)
157
+ end
158
+
159
+ it 'has a transaction_ship_address field that builds a ShipAddress object' do
160
+ invoice.transaction_ship_address = {
161
+ :"@xmlns:platform_common" => 'urn:common_2011_2.platform.webservices.netsuite.com',
162
+ :ship_addr1 => '123 Happy Lane',
163
+ :ship_city => 'Los Angeles',
164
+ :ship_country => '_unitedStates',
165
+ :ship_is_residential => false,
166
+ :ship_state => 'CA',
167
+ :ship_zip => '90007'
168
+ }
169
+ invoice.transaction_ship_address.should be_kind_of(NetSuite::Records::ShipAddress)
170
+ end
171
+
119
172
  describe '#add' do
120
173
  let(:test_data) { { :email => 'test@example.com', :fax => '1234567890' } }
121
174
 
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe NetSuite::Records::ShipAddress do
4
+ let(:ship_address) { NetSuite::Records::ShipAddress.new }
5
+
6
+ it 'has all the right fields' do
7
+ [
8
+ :ship_attention, :ship_addressee, :ship_phone, :ship_addr1, :ship_addr2, :ship_addr3,
9
+ :ship_city, :ship_state, :ship_zip, :ship_country, :ship_is_residential
10
+ ].each do |field|
11
+ ship_address.should have_field(field)
12
+ end
13
+ end
14
+
15
+ end
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3
+ <soapenv:Header>
4
+ <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2011_2.platform.webservices.netsuite.com">
5
+ <platformMsgs:nsId>WEBSERVICES_3392464_0106201212487807681436565242_d5396bca4f5</platformMsgs:nsId>
6
+ </platformMsgs:documentInfo>
7
+ </soapenv:Header>
8
+ <soapenv:Body>
9
+ <getResponse xmlns="urn:messages_2011_2.platform.webservices.netsuite.com">
10
+ <readResponse>
11
+ <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com"/>
12
+ <record internalId="439" externalId="2187" xsi:type="tranSales:Invoice" xmlns:tranSales="urn:sales_2011_2.transactions.webservices.netsuite.com">
13
+ <tranSales:createdDate>2011-12-15T16:54:12.000-08:00</tranSales:createdDate>
14
+ <tranSales:lastModifiedDate>2011-12-16T13:37:57.000-08:00</tranSales:lastModifiedDate>
15
+ <tranSales:customForm internalId="101" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
16
+ <platformCore:name>RP Test Product Invoice</platformCore:name>
17
+ </tranSales:customForm>
18
+ <tranSales:entity internalId="854" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
19
+ <platformCore:name>100023 Office</platformCore:name>
20
+ </tranSales:entity>
21
+ <tranSales:tranDate>2011-01-01T00:00:00.000-08:00</tranSales:tranDate>
22
+ <tranSales:tranId>2187</tranSales:tranId>
23
+ <tranSales:source>CSV</tranSales:source>
24
+ <tranSales:postingPeriod internalId="17" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
25
+ <platformCore:name>Dec 2011</platformCore:name>
26
+ </tranSales:postingPeriod>
27
+ <tranSales:class internalId="1" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
28
+ <platformCore:name>Retail</platformCore:name>
29
+ </tranSales:class>
30
+ <tranSales:dueDate>2011-01-01T00:00:00.000-08:00</tranSales:dueDate>
31
+ <tranSales:salesEffectiveDate>2011-01-01T00:00:00.000-08:00</tranSales:salesEffectiveDate>
32
+ <tranSales:excludeCommission>false</tranSales:excludeCommission>
33
+ <tranSales:amountPaid>0.0</tranSales:amountPaid>
34
+ <tranSales:amountRemaining>15993.6</tranSales:amountRemaining>
35
+ <tranSales:account internalId="123" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
36
+ <platformCore:name>1100 Accounts Receivable</platformCore:name>
37
+ </tranSales:account>
38
+ <tranSales:toBePrinted>false</tranSales:toBePrinted>
39
+ <tranSales:toBeEmailed>false</tranSales:toBeEmailed>
40
+ <tranSales:toBeFaxed>false</tranSales:toBeFaxed>
41
+ <tranSales:transactionBillAddress xmlns:platformCommon="urn:common_2011_2.platform.webservices.netsuite.com">
42
+ <platformCommon:billAddr1>123 Happy Lane</platformCommon:billAddr1>
43
+ <platformCommon:billAddr2>Attn: Accounts Payable</platformCommon:billAddr2>
44
+ <platformCommon:billCity>Los Angeles</platformCommon:billCity>
45
+ <platformCommon:billState>CA</platformCommon:billState>
46
+ <platformCommon:billZip>90007</platformCommon:billZip>
47
+ <platformCommon:billCountry>_unitedStates</platformCommon:billCountry>
48
+ </tranSales:transactionBillAddress>
49
+ <tranSales:billAddressList internalId="433" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
50
+ <platformCore:name>123 Happy Lane</platformCore:name>
51
+ </tranSales:billAddressList>
52
+ <tranSales:billAddress>123 Happy Lane Attn: Accounts Payable Los Angeles CA 90007</tranSales:billAddress>
53
+ <tranSales:transactionShipAddress xmlns:platformCommon="urn:common_2011_2.platform.webservices.netsuite.com">
54
+ <platformCommon:shipAddr1>123 Happy Lane</platformCommon:shipAddr1>
55
+ <platformCommon:shipAddr2>Attn: Accounts Payable</platformCommon:shipAddr2>
56
+ <platformCommon:shipCity>Los Angeles</platformCommon:shipCity>
57
+ <platformCommon:shipState>CA</platformCommon:shipState>
58
+ <platformCommon:shipZip>90007</platformCommon:shipZip>
59
+ <platformCommon:shipCountry>_unitedStates</platformCommon:shipCountry>
60
+ <platformCommon:shipIsResidential>false</platformCommon:shipIsResidential>
61
+ </tranSales:transactionShipAddress>
62
+ <tranSales:shipAddressList internalId="433" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
63
+ <platformCore:name>123 Happy Lane</platformCore:name>
64
+ </tranSales:shipAddressList>
65
+ <tranSales:shipAddress>123 Happy Lane Attn: Accounts Payable Los Angeles CA 90007</tranSales:shipAddress>
66
+ <tranSales:shipDate>2011-12-15T00:00:00.000-08:00</tranSales:shipDate>
67
+ <tranSales:subTotal>15993.6</tranSales:subTotal>
68
+ <tranSales:revenueStatus>_completed</tranSales:revenueStatus>
69
+ <tranSales:syncSalesTeams>false</tranSales:syncSalesTeams>
70
+ <tranSales:discountTotal>0.0</tranSales:discountTotal>
71
+ <tranSales:taxTotal>0.0</tranSales:taxTotal>
72
+ <tranSales:total>15993.6</tranSales:total>
73
+ <tranSales:status>Open</tranSales:status>
74
+ <tranSales:itemCostDiscPrint>false</tranSales:itemCostDiscPrint>
75
+ <tranSales:expCostDiscPrint>false</tranSales:expCostDiscPrint>
76
+ <tranSales:itemList>
77
+ <tranSales:item>
78
+ <tranSales:item internalId="217" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
79
+ <platformCore:name>Dummy Item For Import</platformCore:name>
80
+ </tranSales:item>
81
+ <tranSales:line>1</tranSales:line>
82
+ <tranSales:amount>15993.6</tranSales:amount>
83
+ <tranSales:quantity>1.0</tranSales:quantity>
84
+ <tranSales:price internalId="-1" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
85
+ <platformCore:name>&amp;nbsp;</platformCore:name>
86
+ </tranSales:price>
87
+ <tranSales:taxCode internalId="-8" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
88
+ <platformCore:name>-Not Taxable-</platformCore:name>
89
+ </tranSales:taxCode>
90
+ </tranSales:item>
91
+ </tranSales:itemList>
92
+ <tranSales:customFieldList xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
93
+ <platformCore:customField internalId="custbody_3rd_party" xsi:type="platformCore:BooleanCustomFieldRef">
94
+ <platformCore:value>false</platformCore:value>
95
+ </platformCore:customField>
96
+ </tranSales:customFieldList>
97
+ </record>
98
+ </readResponse>
99
+ </getResponse>
100
+ </soapenv:Body>
101
+ </soapenv:Envelope>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netsuite
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Moran
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-06 00:00:00 Z
18
+ date: 2012-01-07 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: savon
@@ -109,10 +109,12 @@ files:
109
109
  - lib/netsuite/field_support.rb
110
110
  - lib/netsuite/record_ref_support.rb
111
111
  - lib/netsuite/record_support.rb
112
+ - lib/netsuite/records/bill_address.rb
112
113
  - lib/netsuite/records/customer.rb
113
114
  - lib/netsuite/records/customer_addressbook_list.rb
114
115
  - lib/netsuite/records/invoice.rb
115
116
  - lib/netsuite/records/record_ref.rb
117
+ - lib/netsuite/records/ship_address.rb
116
118
  - lib/netsuite/response.rb
117
119
  - lib/netsuite/savon_support.rb
118
120
  - lib/netsuite/version.rb
@@ -125,10 +127,12 @@ files:
125
127
  - spec/netsuite/field_support_spec.rb
126
128
  - spec/netsuite/record_ref_support_spec.rb
127
129
  - spec/netsuite/record_support_spec.rb
130
+ - spec/netsuite/records/bill_address_spec.rb
128
131
  - spec/netsuite/records/customer_addressbook_list_spec.rb
129
132
  - spec/netsuite/records/customer_spec.rb
130
133
  - spec/netsuite/records/invoice_spec.rb
131
134
  - spec/netsuite/records/record_ref_spec.rb
135
+ - spec/netsuite/records/ship_address_spec.rb
132
136
  - spec/netsuite/response_spec.rb
133
137
  - spec/netsuite/savon_support_spec.rb
134
138
  - spec/netsuite_spec.rb
@@ -138,6 +142,7 @@ files:
138
142
  - spec/support/fixtures/add/add_customer.xml
139
143
  - spec/support/fixtures/add/add_invoice.xml
140
144
  - spec/support/fixtures/get/get_customer.xml
145
+ - spec/support/fixtures/get/get_invoice.xml
141
146
  - spec/support/fixtures/initialize/initialize_invoice_from_customer.xml
142
147
  - spec/support/savon.rb
143
148
  - wsdl/2011_02.wsdl
@@ -183,10 +188,12 @@ test_files:
183
188
  - spec/netsuite/field_support_spec.rb
184
189
  - spec/netsuite/record_ref_support_spec.rb
185
190
  - spec/netsuite/record_support_spec.rb
191
+ - spec/netsuite/records/bill_address_spec.rb
186
192
  - spec/netsuite/records/customer_addressbook_list_spec.rb
187
193
  - spec/netsuite/records/customer_spec.rb
188
194
  - spec/netsuite/records/invoice_spec.rb
189
195
  - spec/netsuite/records/record_ref_spec.rb
196
+ - spec/netsuite/records/ship_address_spec.rb
190
197
  - spec/netsuite/response_spec.rb
191
198
  - spec/netsuite/savon_support_spec.rb
192
199
  - spec/netsuite_spec.rb
@@ -196,5 +203,6 @@ test_files:
196
203
  - spec/support/fixtures/add/add_customer.xml
197
204
  - spec/support/fixtures/add/add_invoice.xml
198
205
  - spec/support/fixtures/get/get_customer.xml
206
+ - spec/support/fixtures/get/get_invoice.xml
199
207
  - spec/support/fixtures/initialize/initialize_invoice_from_customer.xml
200
208
  - spec/support/savon.rb