netsuite 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzkxNzQxZDQ4MWIwMDY1NDBmOTMzOTljYjliYTY4NmE3ZWQyNzMzZg==
4
+ ODM0NWE1NmM1YmUwMDU0YzJkZWE3ZWNjYmRhZGRlMDc0MzBjZjkwZg==
5
5
  data.tar.gz: !binary |-
6
- NjBkY2E4YmU0ODQ4Y2VhMTY1Mzc2YTQ5MTc5NmU2YjNjOTUyMjczOA==
6
+ M2Q3ZDkwZmJhYjg0ZDlhYWI3MTgyYTM0NTZjMDY0YjY5OTk5YjE4Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2QyMTRjNjYyODAyNjE2OTNkNWFhMWY5ZTc4N2VlM2YxNzA1M2M2MmQ1ZWEy
10
- MTdhMmY2Y2I5ZDFiOTM2YjMwNmYzY2UxMThmODYzOWYyMGUyMjQ0YzVkOGQ4
11
- MmZjYmMzYTA5MDM2NjQ5YjRkMDYxMWYzYTI1OGMxN2RiNTIwM2U=
9
+ YTY0ZjU1Mjc4MzVkNTE3YzE1Yjk3Njc1ZDhhZjM5NzYxNjZiNDMyNzhjN2Nh
10
+ NzEyNDZhOTk2ZDJjZmIxM2VmNmI2ZGU1YjdmMjU0ZGNjY2VlNTQzOTE0ZTc1
11
+ ZGU0OWExNjAwZTQ2MWJhYTU5NzY5ZmU2MjA3YTE2MTU1OGE5YTE=
12
12
  data.tar.gz: !binary |-
13
- OThiMjMzZjEwZjUzYmE5YjU5YWIwZTliOTAwYmVjZmFjYjIzMjUxYTQ5NTQ5
14
- MjQwYzBiZTAxZGQ4YTFmYWRmZjlkMTExZWU2MTYwM2JlMWQ0YzJjZjI3OWI5
15
- NGY1NzAyMTA4ZjA4MmU4ODI0MGQ5MTgxNjVkMDAwNDg3MDE1Njk=
13
+ ZmIxOTE1MGZjNmI3NTlkMDZjZGM2ZjhhYmQzYjczZDA3NjAzZTc4NzgxZGU5
14
+ ZmI4Y2UyMjc1ZTJhYWViOWNlYjgxMjc0MmE1NTFiMTkzODVjMjgzNWEzYTYx
15
+ NDYyYmU1NGQ0N2YyNzYwZWY3ZWM5YjA2NTg0NmI3ZmIzNTk5Yjk=
@@ -18,9 +18,11 @@ module NetSuite
18
18
  actions :add, :get, :upsert
19
19
 
20
20
  fields :custom_form, :payment, :tran_date, :exchange_rate, :undep_funds, :memo,
21
- :check_num
21
+ :check_num, :klass
22
22
 
23
- record_refs :customer, :sales_order, :account
23
+ field :custom_field_list, CustomFieldList
24
+
25
+ record_refs :customer, :sales_order, :account, :department, :payment_method
24
26
 
25
27
  attr_reader :internal_id
26
28
  attr_accessor :external_id
@@ -1,32 +1,9 @@
1
1
  module NetSuite
2
2
  module Records
3
- class DepositCashBackList
4
- include Support::Fields
3
+ class DepositCashBackList < Support::Sublist
5
4
  include Namespaces::TranBank
6
5
 
7
- fields :deposit_cash_back
8
-
9
- def initialize(attributes = {})
10
- initialize_from_attributes_hash(attributes)
11
- end
12
-
13
- def cashback=(cashbacks)
14
- case cashbacks
15
- when Hash
16
- self.cashbacks << DepositCashBack.new(cashbacks)
17
- when Array
18
- cashbacks.each { |cb| self.cashbacks << DepositCashBack.new(cb) }
19
- end
20
- end
21
-
22
- def cashbacks
23
- @cashbacks ||= []
24
- end
25
-
26
- def to_record
27
- { "#{record_namespace}:depositCashBack" => cashbacks.map(&:to_record) }
28
- end
29
-
6
+ sublist :deposit_cash_back, DepositCashBack
30
7
  end
31
8
  end
32
9
  end
@@ -1,32 +1,9 @@
1
1
  module NetSuite
2
2
  module Records
3
- class DepositOtherList
4
- include Support::Fields
3
+ class DepositOtherList < Support::Sublist
5
4
  include Namespaces::TranBank
6
5
 
7
- fields :deposit_other
8
-
9
- def initialize(attributes = {})
10
- initialize_from_attributes_hash(attributes)
11
- end
12
-
13
- def other=(others)
14
- case others
15
- when Hash
16
- self.others << DepositOther.new(others)
17
- when Array
18
- others.each { |cb| self.others << DepositOther.new(cb) }
19
- end
20
- end
21
-
22
- def others
23
- @others ||= []
24
- end
25
-
26
- def to_record
27
- { "#{record_namespace}:depositOther" => others.map(&:to_record) }
28
- end
29
-
6
+ sublist :deposit_other, DepositOther
30
7
  end
31
8
  end
32
9
  end
@@ -1,3 +1,3 @@
1
1
  module Netsuite
2
- VERSION = '0.4.5'
2
+ VERSION = '0.4.6'
3
3
  end
@@ -48,9 +48,10 @@ describe NetSuite::Records::Deposit do
48
48
  amount: 100,
49
49
  memo: "test"
50
50
  }
51
- deposit.cash_back_list.cashback = attributes
51
+
52
+ deposit.cash_back_list.deposit_cash_back = attributes
52
53
  expect(deposit.cash_back_list).to be_kind_of(NetSuite::Records::DepositCashBackList)
53
- expect(deposit.cash_back_list.cashbacks.length).to eql(1)
54
+ expect(deposit.cash_back_list.deposit_cash_back.length).to eql(1)
54
55
  end
55
56
 
56
57
  it 'can be set from a DepositCashBackList object' do
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.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Moran
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-27 00:00:00.000000000 Z
12
+ date: 2015-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon