netsuite 0.0.32 → 0.0.33

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.
@@ -20,8 +20,8 @@ module NetSuite
20
20
  :vsoe_auto_calc
21
21
 
22
22
  field :transaction_bill_address, BillAddress
23
- field :item_list, CreditMemoItemList
24
- field :apply_list, CreditMemoApplyList
23
+ field :item_list, CreditMemoItemList
24
+ field :apply_list, CreditMemoApplyList
25
25
 
26
26
  read_only_fields :applied, :discount_total, :sub_total, :tax_total, :total, :unapplied
27
27
 
@@ -17,14 +17,14 @@ module NetSuite
17
17
  end
18
18
 
19
19
  def to_record
20
- custom_fields.map do |custom_field|
21
- {
20
+ custom_fields.map { |custom_field|
21
+ Gyoku.xml({
22
22
  "#{record_namespace}:customField" => custom_field.to_record,
23
23
  :attributes! => {
24
24
  "#{record_namespace}:customField" => custom_field.attributes!
25
25
  }
26
- }
27
- end
26
+ })
27
+ }.join
28
28
  end
29
29
 
30
30
  end
@@ -50,6 +50,12 @@ module NetSuite
50
50
  "#{record_namespace}:CustomRecord"
51
51
  end
52
52
 
53
+ def to_record
54
+ rec = super
55
+ rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
56
+ rec
57
+ end
58
+
53
59
  end
54
60
  end
55
61
  end
@@ -42,6 +42,14 @@ module NetSuite
42
42
  initialize_from_attributes_hash(attributes)
43
43
  end
44
44
 
45
+ def to_record
46
+ rec = super
47
+ if rec["#{record_namespace}:customFieldList"]
48
+ rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
49
+ end
50
+ rec
51
+ end
52
+
45
53
  end
46
54
  end
47
55
  end
@@ -31,6 +31,14 @@ module NetSuite
31
31
  initialize_from_attributes_hash(attributes)
32
32
  end
33
33
 
34
+ def to_record
35
+ rec = super
36
+ if rec["#{record_namespace}:customFieldList"]
37
+ rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
38
+ end
39
+ rec
40
+ end
41
+
34
42
  end
35
43
  end
36
44
  end
@@ -31,6 +31,14 @@ module NetSuite
31
31
  initialize_from_attributes_hash(attributes)
32
32
  end
33
33
 
34
+ def to_record
35
+ rec = super
36
+ if rec["#{record_namespace}:customFieldList"]
37
+ rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
38
+ end
39
+ rec
40
+ end
41
+
34
42
  end
35
43
  end
36
44
  end
@@ -48,6 +48,14 @@ module NetSuite
48
48
  initialize_from_attributes_hash(attributes)
49
49
  end
50
50
 
51
+ def to_record
52
+ rec = super
53
+ if rec["#{record_namespace}:customFieldList"]
54
+ rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
55
+ end
56
+ rec
57
+ end
58
+
51
59
  end
52
60
  end
53
61
  end
@@ -22,6 +22,14 @@ module NetSuite
22
22
  initialize_from_attributes_hash(attributes)
23
23
  end
24
24
 
25
+ def to_record
26
+ rec = super
27
+ if rec["#{record_namespace}:customFieldList"]
28
+ rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
29
+ end
30
+ rec
31
+ end
32
+
25
33
  end
26
34
  end
27
35
  end
@@ -14,6 +14,14 @@ module NetSuite
14
14
  initialize_from_attributes_hash(attributes)
15
15
  end
16
16
 
17
+ def to_record
18
+ rec = super
19
+ if rec["#{record_namespace}:customFieldList"]
20
+ rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
21
+ end
22
+ rec
23
+ end
24
+
17
25
  end
18
26
  end
19
27
  end
@@ -1,3 +1,3 @@
1
1
  module Netsuite
2
- VERSION = '0.0.32'
2
+ VERSION = '0.0.33'
3
3
  end
@@ -17,19 +17,7 @@ describe NetSuite::Records::CustomFieldList do
17
17
  end
18
18
 
19
19
  it 'can represent itself as a SOAP record' do
20
- record = [
21
- {
22
- 'platformCore:customField' => {
23
- 'platformCore:value' => false
24
- },
25
- :attributes! => {
26
- 'platformCore:customField' => {
27
- 'internalId' => '3',
28
- 'xsi:type' => 'BooleanCustomFieldRef'
29
- }
30
- }
31
- }
32
- ]
20
+ record = "<platformCore:customField internalId=\"3\" xsi:type=\"BooleanCustomFieldRef\"><platformCore:value>false</platformCore:value></platformCore:customField>"
33
21
  list.to_record.should eql(record)
34
22
  end
35
23
  end
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: 95
4
+ hash: 93
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 32
10
- version: 0.0.32
9
+ - 33
10
+ version: 0.0.33
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Moran