netsuite 0.3.0 → 0.3.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 +1 -1
- data/lib/netsuite.rb +0 -1
- data/lib/netsuite/actions/search.rb +5 -0
- data/lib/netsuite/records/file.rb +3 -8
- data/lib/netsuite/support/country.rb +2 -2
- data/lib/netsuite/version.rb +1 -1
- data/netsuite.gemspec +1 -1
- data/spec/netsuite/actions/add_spec.rb +14 -14
- data/spec/netsuite/actions/delete_spec.rb +2 -2
- data/spec/netsuite/actions/get_spec.rb +3 -3
- data/spec/netsuite/actions/initialize_spec.rb +2 -2
- data/spec/netsuite/actions/search_spec.rb +6 -6
- data/spec/netsuite/actions/update_spec.rb +16 -16
- data/spec/netsuite/actions/upsert_list_spec.rb +4 -4
- data/spec/netsuite/actions/upsert_spec.rb +14 -14
- data/spec/netsuite/configuration_spec.rb +21 -21
- data/spec/netsuite/records/account_spec.rb +16 -16
- data/spec/netsuite/records/accounting_period_spec.rb +16 -16
- data/spec/netsuite/records/assembly_item_spec.rb +2 -2
- data/spec/netsuite/records/bill_address_spec.rb +3 -3
- data/spec/netsuite/records/billing_schedule_milestone_list_spec.rb +4 -4
- data/spec/netsuite/records/billing_schedule_milestone_spec.rb +6 -6
- data/spec/netsuite/records/billing_schedule_recurrence_list_spec.rb +4 -4
- data/spec/netsuite/records/billing_schedule_recurrence_spec.rb +6 -6
- data/spec/netsuite/records/billing_schedule_spec.rb +20 -20
- data/spec/netsuite/records/campaign_spec.rb +7 -7
- data/spec/netsuite/records/classification_spec.rb +10 -10
- data/spec/netsuite/records/credit_memo_apply_list_spec.rb +2 -2
- data/spec/netsuite/records/credit_memo_apply_spec.rb +1 -1
- data/spec/netsuite/records/credit_memo_item_list_spec.rb +2 -2
- data/spec/netsuite/records/credit_memo_item_spec.rb +2 -2
- data/spec/netsuite/records/credit_memo_spec.rb +26 -26
- data/spec/netsuite/records/custom_field_list_spec.rb +10 -10
- data/spec/netsuite/records/custom_list_spec.rb +3 -3
- data/spec/netsuite/records/custom_record_spec.rb +20 -20
- data/spec/netsuite/records/custom_record_type_spec.rb +16 -16
- data/spec/netsuite/records/customer_addressbook_list_spec.rb +2 -2
- data/spec/netsuite/records/customer_addressbook_spec.rb +38 -28
- data/spec/netsuite/records/customer_payment_spec.rb +23 -23
- data/spec/netsuite/records/customer_refund_apply_list_spec.rb +2 -2
- data/spec/netsuite/records/customer_refund_apply_spec.rb +1 -1
- data/spec/netsuite/records/customer_refund_deposit_list_spec.rb +2 -2
- data/spec/netsuite/records/customer_refund_deposit_spec.rb +1 -1
- data/spec/netsuite/records/customer_refund_spec.rb +28 -28
- data/spec/netsuite/records/customer_spec.rb +24 -24
- data/spec/netsuite/records/department_spec.rb +16 -16
- data/spec/netsuite/records/deposit_spec.rb +24 -24
- data/spec/netsuite/records/discount_item_spec.rb +19 -19
- data/spec/netsuite/records/duration_spec.rb +1 -1
- data/spec/netsuite/records/inventory_item_spec.rb +18 -18
- data/spec/netsuite/records/inventory_transfer_spec.rb +5 -5
- data/spec/netsuite/records/invoice_item_list_spec.rb +4 -4
- data/spec/netsuite/records/invoice_item_spec.rb +11 -11
- data/spec/netsuite/records/invoice_spec.rb +32 -32
- data/spec/netsuite/records/item_fulfillment_package_list_spec.rb +2 -2
- data/spec/netsuite/records/job_spec.rb +31 -31
- data/spec/netsuite/records/journal_entry_line_list_spec.rb +2 -2
- data/spec/netsuite/records/journal_entry_line_spec.rb +7 -7
- data/spec/netsuite/records/journal_entry_spec.rb +25 -25
- data/spec/netsuite/records/location_spec.rb +8 -8
- data/spec/netsuite/records/non_inventory_sale_item_spec.rb +20 -20
- data/spec/netsuite/records/payment_method_spec.rb +8 -8
- data/spec/netsuite/records/phone_call_spec.rb +2 -2
- data/spec/netsuite/records/pomo_code_spec.rb +7 -7
- data/spec/netsuite/records/record_ref_spec.rb +12 -12
- data/spec/netsuite/records/rev_rec_template_spec.rb +7 -7
- data/spec/netsuite/records/sales_order_item_list_spec.rb +2 -2
- data/spec/netsuite/records/sales_order_item_spec.rb +2 -2
- data/spec/netsuite/records/sales_order_spec.rb +23 -23
- data/spec/netsuite/records/sales_tax_item_spec.rb +2 -2
- data/spec/netsuite/records/service_sale_item_spec.rb +20 -20
- data/spec/netsuite/records/ship_address_spec.rb +3 -3
- data/spec/netsuite/records/site_category_spec.rb +8 -8
- data/spec/netsuite/records/subsidiary_spec.rb +2 -2
- data/spec/netsuite/records/support_case_spec.rb +25 -25
- data/spec/netsuite/records/tax_type_spec.rb +1 -1
- data/spec/netsuite/records/term_spec.rb +15 -15
- data/spec/netsuite/records/units_type_spec.rb +4 -4
- data/spec/netsuite/records/units_type_uom_list_spec.rb +4 -4
- data/spec/netsuite/records/units_type_uom_spec.rb +1 -1
- data/spec/netsuite/records/work_order_item_list_spec.rb +2 -2
- data/spec/netsuite/records/work_order_item_spec.rb +4 -4
- data/spec/netsuite/records/work_order_spec.rb +13 -13
- data/spec/netsuite/response_spec.rb +4 -4
- data/spec/netsuite/support/fields_spec.rb +6 -6
- data/spec/netsuite/support/record_refs_spec.rb +1 -1
- data/spec/netsuite/support/records_spec.rb +2 -2
- data/spec/netsuite/support/requests_spec.rb +6 -6
- data/spec/netsuite_spec.rb +4 -4
- data/spec/spec_helper.rb +0 -2
- data/spec/support/read_only_field_matcher.rb +1 -1
- data/spec/support/record_ref_matcher.rb +2 -2
- metadata +4 -4
|
@@ -7,7 +7,7 @@ describe NetSuite::Records::UnitsType do
|
|
|
7
7
|
[
|
|
8
8
|
:is_inactive, :name
|
|
9
9
|
].each do |field|
|
|
10
|
-
units_type.
|
|
10
|
+
expect(units_type).to have_field(field)
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
@@ -20,14 +20,14 @@ describe NetSuite::Records::UnitsType do
|
|
|
20
20
|
}
|
|
21
21
|
}]
|
|
22
22
|
units_type.uom_list.uom = attributes
|
|
23
|
-
units_type.uom_list.
|
|
24
|
-
units_type.uom_list.uom.length.
|
|
23
|
+
expect(units_type.uom_list).to be_kind_of(NetSuite::Records::UnitsTypeUomList)
|
|
24
|
+
expect(units_type.uom_list.uom.length).to eql(1)
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
it 'can be set from a units_typeItemList object' do
|
|
28
28
|
item_list = NetSuite::Records::UnitsTypeUomList.new
|
|
29
29
|
units_type.uom_list = item_list
|
|
30
|
-
units_type.uom_list.
|
|
30
|
+
expect(units_type.uom_list).to eql(item_list)
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
end
|
|
@@ -7,9 +7,9 @@ describe NetSuite::Records::UnitsTypeUomList do
|
|
|
7
7
|
it 'can have items be added to it' do
|
|
8
8
|
list.uom << item
|
|
9
9
|
item_list = list.uom
|
|
10
|
-
item_list.
|
|
11
|
-
item_list.length.
|
|
12
|
-
item_list.each { |i| i.
|
|
10
|
+
expect(item_list).to be_kind_of(Array)
|
|
11
|
+
expect(item_list.length).to eql(1)
|
|
12
|
+
item_list.each { |i| expect(i).to be_kind_of(NetSuite::Records::UnitsTypeUom) }
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
describe '#to_record' do
|
|
@@ -17,7 +17,7 @@ describe NetSuite::Records::UnitsTypeUomList do
|
|
|
17
17
|
record = {
|
|
18
18
|
'listAcct:uom' => []
|
|
19
19
|
}
|
|
20
|
-
list.to_record.
|
|
20
|
+
expect(list.to_record).to eql(record)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
end
|
|
@@ -4,7 +4,7 @@ describe NetSuite::Records::WorkOrderItemList do
|
|
|
4
4
|
let(:list) { NetSuite::Records::WorkOrderItemList.new }
|
|
5
5
|
|
|
6
6
|
it 'has a items attribute' do
|
|
7
|
-
list.items.
|
|
7
|
+
expect(list.items).to be_kind_of(Array)
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
describe '#to_record' do
|
|
@@ -20,7 +20,7 @@ describe NetSuite::Records::WorkOrderItemList do
|
|
|
20
20
|
'tranInvt:averageCost' => 10
|
|
21
21
|
}]
|
|
22
22
|
}
|
|
23
|
-
list.to_record.
|
|
23
|
+
expect(list.to_record).to eql(record)
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
|
@@ -11,7 +11,7 @@ describe NetSuite::Records::WorkOrderItem do
|
|
|
11
11
|
:quantity_committed, :quantity_on_hand, :serial_numbers
|
|
12
12
|
].each do |field|
|
|
13
13
|
it "has the #{field} field" do
|
|
14
|
-
work_order.
|
|
14
|
+
expect(work_order).to have_field(field)
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -32,14 +32,14 @@ describe NetSuite::Records::WorkOrderItem do
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
work_order.custom_field_list = attributes
|
|
35
|
-
work_order.custom_field_list.
|
|
36
|
-
work_order.custom_field_list.custom_fields.length.
|
|
35
|
+
expect(work_order.custom_field_list).to be_kind_of(NetSuite::Records::CustomFieldList)
|
|
36
|
+
expect(work_order.custom_field_list.custom_fields.length).to eql(1)
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
it 'can be set from a CustomFieldList object' do
|
|
40
40
|
custom_field_list = NetSuite::Records::CustomFieldList.new
|
|
41
41
|
work_order.custom_field_list = custom_field_list
|
|
42
|
-
work_order.custom_field_list.
|
|
42
|
+
expect(work_order.custom_field_list).to eql(custom_field_list)
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|
|
@@ -11,7 +11,7 @@ describe NetSuite::Records::WorkOrder do
|
|
|
11
11
|
:tran_id
|
|
12
12
|
].each do |field|
|
|
13
13
|
it "has the #{field} field" do
|
|
14
|
-
work_order.
|
|
14
|
+
expect(work_order).to have_field(field)
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -34,14 +34,14 @@ describe NetSuite::Records::WorkOrder do
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
work_order.custom_field_list = attributes
|
|
37
|
-
work_order.custom_field_list.
|
|
38
|
-
work_order.custom_field_list.custom_fields.length.
|
|
37
|
+
expect(work_order.custom_field_list).to be_kind_of(NetSuite::Records::CustomFieldList)
|
|
38
|
+
expect(work_order.custom_field_list.custom_fields.length).to eql(1)
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
it 'can be set from a CustomFieldList object' do
|
|
42
42
|
custom_field_list = NetSuite::Records::CustomFieldList.new
|
|
43
43
|
work_order.custom_field_list = custom_field_list
|
|
44
|
-
work_order.custom_field_list.
|
|
44
|
+
expect(work_order.custom_field_list).to eql(custom_field_list)
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -54,14 +54,14 @@ describe NetSuite::Records::WorkOrder do
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
work_order.item_list = attributes
|
|
57
|
-
work_order.item_list.
|
|
58
|
-
work_order.item_list.items.length.
|
|
57
|
+
expect(work_order.item_list).to be_kind_of(NetSuite::Records::WorkOrderItemList)
|
|
58
|
+
expect(work_order.item_list.items.length).to eql(1)
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
it 'can be set from a WorkOrderItemList object' do
|
|
62
62
|
order_item_list = NetSuite::Records::WorkOrderItemList.new
|
|
63
63
|
work_order.item_list = order_item_list
|
|
64
|
-
work_order.item_list.
|
|
64
|
+
expect(work_order.item_list).to eq(order_item_list)
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -70,10 +70,10 @@ describe NetSuite::Records::WorkOrder do
|
|
|
70
70
|
let(:response) { NetSuite::Response.new(:success => true, :body => { :buildable => 100 }) }
|
|
71
71
|
|
|
72
72
|
it 'returns a WorkOrder instance populated with the data from the response object' do
|
|
73
|
-
NetSuite::Actions::Get.
|
|
73
|
+
expect(NetSuite::Actions::Get).to receive(:call).with([NetSuite::Records::WorkOrder, :external_id => 1], {}).and_return(response)
|
|
74
74
|
salesorder = NetSuite::Records::WorkOrder.get(:external_id => 1)
|
|
75
|
-
salesorder.
|
|
76
|
-
salesorder.buildable.
|
|
75
|
+
expect(salesorder).to be_kind_of(NetSuite::Records::WorkOrder)
|
|
76
|
+
expect(salesorder.buildable).to eql(100)
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
79
|
|
|
@@ -81,10 +81,10 @@ describe NetSuite::Records::WorkOrder do
|
|
|
81
81
|
let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
|
|
82
82
|
|
|
83
83
|
it 'raises a RecordNotFound exception' do
|
|
84
|
-
NetSuite::Actions::Get.
|
|
85
|
-
|
|
84
|
+
expect(NetSuite::Actions::Get).to receive(:call).with([NetSuite::Records::WorkOrder, :external_id => 1], {}).and_return(response)
|
|
85
|
+
expect {
|
|
86
86
|
NetSuite::Records::WorkOrder.get(:external_id => 1)
|
|
87
|
-
}.
|
|
87
|
+
}.to raise_error(NetSuite::RecordNotFound,
|
|
88
88
|
/NetSuite::Records::WorkOrder with OPTIONS=(.*) could not be found/)
|
|
89
89
|
end
|
|
90
90
|
end
|
|
@@ -7,12 +7,12 @@ describe NetSuite::Response do
|
|
|
7
7
|
it 'allows the body to be set through a :body option' do
|
|
8
8
|
test_body = { :banana => 'sandwich' }
|
|
9
9
|
response = NetSuite::Response.new(:body => test_body)
|
|
10
|
-
response.body.
|
|
10
|
+
expect(response.body).to eql(test_body)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
it 'allows the success status to be set through a :success option' do
|
|
14
14
|
response = NetSuite::Response.new(:success => true)
|
|
15
|
-
response.
|
|
15
|
+
expect(response).to be_success
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -20,14 +20,14 @@ describe NetSuite::Response do
|
|
|
20
20
|
it 'returns the hash contents of the SOAP response body' do
|
|
21
21
|
test_body = { :test => false }
|
|
22
22
|
response.body = test_body
|
|
23
|
-
response.body.
|
|
23
|
+
expect(response.body).to eql(test_body)
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
describe '#success?' do
|
|
28
28
|
it 'returns the success status of the response' do
|
|
29
29
|
response.success!
|
|
30
|
-
response.
|
|
30
|
+
expect(response).to be_success
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -8,7 +8,7 @@ describe NetSuite::Support::Fields do
|
|
|
8
8
|
context 'with arguments' do
|
|
9
9
|
it 'calls .field with each argument passed to it' do
|
|
10
10
|
[:one, :two, :three].each do |field|
|
|
11
|
-
klass.
|
|
11
|
+
expect(klass).to receive(:field).with(field)
|
|
12
12
|
end
|
|
13
13
|
klass.fields(:one, :two, :three)
|
|
14
14
|
end
|
|
@@ -18,7 +18,7 @@ describe NetSuite::Support::Fields do
|
|
|
18
18
|
it 'returns a Set of the field arguments' do
|
|
19
19
|
arguments = [:one, :two, :three]
|
|
20
20
|
klass.fields(*arguments)
|
|
21
|
-
klass.fields.
|
|
21
|
+
expect(klass.fields).to eql(Set.new(arguments))
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
end
|
|
@@ -27,7 +27,7 @@ describe NetSuite::Support::Fields do
|
|
|
27
27
|
it 'defines instance accessor methods for the given field' do
|
|
28
28
|
klass.field(:one)
|
|
29
29
|
instance.one = 1
|
|
30
|
-
instance.one.
|
|
30
|
+
expect(instance.one).to eql(1)
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -35,7 +35,7 @@ describe NetSuite::Support::Fields do
|
|
|
35
35
|
context 'with arguments' do
|
|
36
36
|
it 'calls .read_only_field with each argument passed to it' do
|
|
37
37
|
[:one, :two, :three].each do |field|
|
|
38
|
-
klass.
|
|
38
|
+
expect(klass).to receive(:read_only_field).with(field)
|
|
39
39
|
end
|
|
40
40
|
klass.read_only_fields(:one, :two, :three)
|
|
41
41
|
end
|
|
@@ -45,14 +45,14 @@ describe NetSuite::Support::Fields do
|
|
|
45
45
|
it 'returns a Set of the read_only_field arguments' do
|
|
46
46
|
arguments = [:one, :two, :three]
|
|
47
47
|
klass.read_only_fields(*arguments)
|
|
48
|
-
klass.read_only_fields.
|
|
48
|
+
expect(klass.read_only_fields).to eql(Set.new(arguments))
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
describe '.read_only_field' do
|
|
54
54
|
it 'defines instance accessor methods for the given field' do
|
|
55
|
-
klass.
|
|
55
|
+
expect(klass).to receive(:field).with(:one)
|
|
56
56
|
klass.read_only_field(:one)
|
|
57
57
|
end
|
|
58
58
|
end
|
|
@@ -8,7 +8,7 @@ describe NetSuite::Support::RecordRefs do
|
|
|
8
8
|
it 'assigns a nil value for a field with a specified class' do
|
|
9
9
|
klass.field(:record_test, NetSuite::Records::RecordRef)
|
|
10
10
|
instance.record_test = nil
|
|
11
|
-
instance.attributes.has_key?(:record_test).
|
|
11
|
+
expect(instance.attributes.has_key?(:record_test)).to be_falsey
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
end
|
|
@@ -18,7 +18,7 @@ describe NetSuite::Support::Records do
|
|
|
18
18
|
|
|
19
19
|
describe '#record_type' do
|
|
20
20
|
it 'returns a hash of attributes to be used in a SOAP request' do
|
|
21
|
-
instance.to_record.
|
|
21
|
+
expect(instance.to_record).to eql({
|
|
22
22
|
'platformCore:source' => 'Google',
|
|
23
23
|
'platformCore:total' => 100.0
|
|
24
24
|
})
|
|
@@ -27,7 +27,7 @@ describe NetSuite::Support::Records do
|
|
|
27
27
|
|
|
28
28
|
describe '#record_type' do
|
|
29
29
|
it 'returns a string of the record type to be used in a SOAP request' do
|
|
30
|
-
instance.record_type.
|
|
30
|
+
expect(instance.record_type).to eql('platformCore:Baz')
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -9,24 +9,24 @@ describe NetSuite::Support::Requests do
|
|
|
9
9
|
|
|
10
10
|
describe '#call' do
|
|
11
11
|
before do
|
|
12
|
-
instance.
|
|
13
|
-
instance.
|
|
14
|
-
instance.
|
|
12
|
+
allow(instance).to receive(:request)
|
|
13
|
+
allow(instance).to receive(:success?)
|
|
14
|
+
allow(instance).to receive(:response_body)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
it 'calls #request' do
|
|
18
|
-
instance.
|
|
18
|
+
expect(instance).to receive(:request)
|
|
19
19
|
instance.call
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
it 'calls #build_response' do
|
|
23
|
-
instance.
|
|
23
|
+
expect(instance).to receive(:build_response)
|
|
24
24
|
instance.call
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
it 'returns a NetSuite::Response object' do
|
|
28
28
|
response = instance.call
|
|
29
|
-
response.
|
|
29
|
+
expect(response).to be_kind_of(NetSuite::Response)
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
data/spec/netsuite_spec.rb
CHANGED
|
@@ -12,28 +12,28 @@ describe NetSuite do
|
|
|
12
12
|
NetSuite.configure do
|
|
13
13
|
email 'me@example.com'
|
|
14
14
|
end
|
|
15
|
-
config.email.
|
|
15
|
+
expect(config.email).to eql('me@example.com')
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
it 'allows the Configuration #password instance method to be called with instance eval' do
|
|
19
19
|
NetSuite.configure do
|
|
20
20
|
password 'myPassword'
|
|
21
21
|
end
|
|
22
|
-
config.password.
|
|
22
|
+
expect(config.password).to eql('myPassword')
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
it 'allows the Configuration #account instance method to be called with instance eval' do
|
|
26
26
|
NetSuite.configure do
|
|
27
27
|
account 1234
|
|
28
28
|
end
|
|
29
|
-
config.account.
|
|
29
|
+
expect(config.account).to eql(1234)
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
it 'allows the Configuration #wsdl instance method to be called with instance_eval' do
|
|
33
33
|
NetSuite.configure do
|
|
34
34
|
wsdl 'https://system.sandbox.netsuite.com/wsdl/v2011_2_0/netsuite.wsdl'
|
|
35
35
|
end
|
|
36
|
-
config.wsdl.
|
|
36
|
+
expect(config.wsdl).to eql('https://system.sandbox.netsuite.com/wsdl/v2011_2_0/netsuite.wsdl')
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -6,12 +6,12 @@ RSpec::Matchers.define :have_record_ref do |attribute|
|
|
|
6
6
|
|
|
7
7
|
def record_ref_can_be_set_and_retrieved?(model, attribute)
|
|
8
8
|
model.send("#{attribute}=".to_sym, attributes)
|
|
9
|
-
model.send(attribute).
|
|
9
|
+
expect(model.send(attribute)).to be_kind_of(NetSuite::Records::RecordRef)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def record_ref_can_be_set_on_instantiation?(model, attribute)
|
|
13
13
|
new_model = model.class.new(attribute => attributes)
|
|
14
|
-
new_model.send(attribute).
|
|
14
|
+
expect(new_model.send(attribute)).to be_kind_of(NetSuite::Records::RecordRef)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def attributes
|
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.3.
|
|
4
|
+
version: 0.3.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: 2014-12-
|
|
13
|
+
date: 2014-12-26 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: savon
|
|
@@ -35,7 +35,7 @@ dependencies:
|
|
|
35
35
|
requirements:
|
|
36
36
|
- - ~>
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
|
-
version:
|
|
38
|
+
version: 3.1.0
|
|
39
39
|
type: :development
|
|
40
40
|
prerelease: false
|
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -43,7 +43,7 @@ dependencies:
|
|
|
43
43
|
requirements:
|
|
44
44
|
- - ~>
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version:
|
|
46
|
+
version: 3.1.0
|
|
47
47
|
description: NetSuite SuiteTalk API Wrapper
|
|
48
48
|
email:
|
|
49
49
|
- ryan.moran@gmail.com
|