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.
- data/lib/netsuite/records/credit_memo.rb +2 -2
- data/lib/netsuite/records/custom_field_list.rb +4 -4
- data/lib/netsuite/records/custom_record.rb +6 -0
- data/lib/netsuite/records/customer.rb +8 -0
- data/lib/netsuite/records/customer_payment.rb +8 -0
- data/lib/netsuite/records/customer_refund.rb +8 -0
- data/lib/netsuite/records/invoice.rb +8 -0
- data/lib/netsuite/records/journal_entry.rb +8 -0
- data/lib/netsuite/records/journal_entry_line.rb +8 -0
- data/lib/netsuite/version.rb +1 -1
- data/spec/netsuite/records/custom_field_list_spec.rb +1 -13
- metadata +3 -3
@@ -20,8 +20,8 @@ module NetSuite
|
|
20
20
|
:vsoe_auto_calc
|
21
21
|
|
22
22
|
field :transaction_bill_address, BillAddress
|
23
|
-
field :item_list,
|
24
|
-
field :apply_list,
|
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
|
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
|
-
|
26
|
+
})
|
27
|
+
}.join
|
28
28
|
end
|
29
29
|
|
30
30
|
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
|
data/lib/netsuite/version.rb
CHANGED
@@ -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:
|
4
|
+
hash: 93
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 33
|
10
|
+
version: 0.0.33
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Moran
|