qbwc_requests 0.5.0 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d334f459f1701c9acae25612b10591a30edb94d3
4
- data.tar.gz: b73c9315f8cb7fa73b24c5d9ec6283c066ccd44c
3
+ metadata.gz: bad10fa9fe82023dacbca36a936f085a54c90895
4
+ data.tar.gz: 4481b69341bc1b2890bf84906fa6048d3382de09
5
5
  SHA512:
6
- metadata.gz: 1f713f143531ecd1ab9cfdb4bd140a5ec96cc28af312213696f822b6adb03aacf3a22ea9b54b3a09179ba3692f61e4b819fe08ce53f2ddb8e9f4449f0297cfb5
7
- data.tar.gz: 1d274739f8ddae12cfa2871ca02e3af5de4b29cb39b0d2cf6fdcff9b62e08e848d9264de78c187e487f7bf2007133874c345aa89969e94832ffb584c563c5bb8
6
+ metadata.gz: d07a27c17616ee569dbffe54d2d12277fb56c227bc99e6f841f774e192c2c509eca0a0b8282a90620def6bc54930cba4d74c25df4a061941f2269b3b5da595e7
7
+ data.tar.gz: 261833b2f637362aef3538e15c3b34ea25ccc0ed28602f960aeabd6a69d97c761b8e6d7b2bca769229a303fbf5c9a10c5abf629a8f7e4d3a0e7dbde20bd3388d
@@ -4,11 +4,12 @@ module QbwcRequests
4
4
  class Add < QbwcRequests::Base
5
5
 
6
6
  ref_to :vendor, 41
7
- field :memo
8
7
  field :txn_date
9
- field :ref_number
10
8
  field :due_date
9
+ field :ref_number
10
+ field :memo
11
11
  field :expense_line_add
12
+ field :item_line_add
12
13
 
13
14
  validates :memo, length: { maximum: 4095 }
14
15
  validates :ref_number, length: { maximum: 11 }
@@ -1,3 +1,3 @@
1
1
  module QbwcRequests
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -7,6 +7,33 @@ describe BillQbxml do
7
7
  end
8
8
 
9
9
  describe "add" do
10
+ let(:line_1) do
11
+ {
12
+ item_ref: {list_id: '01-01', full_name: 'one'},
13
+ desc: 'line item 1',
14
+ quantity: 50,
15
+ unit_of_measure: 'yards',
16
+ cost: 15.001,
17
+ amount: 750.05,
18
+ customer_ref: {list_id: '08-01', full_name: 'project_one'},
19
+ billable_status: 'HasBeenBilled',
20
+ data_ext: {owner_id: 55555, data_ext_name: 'line_one', data_ext_value: 1},
21
+ }
22
+ end
23
+
24
+ let(:line_2) do
25
+ {
26
+ item_ref: {list_id: '01-02', full_name: 'two'},
27
+ desc: 'line item 2',
28
+ quantity: 25,
29
+ unit_of_measure: 'feet',
30
+ cost: 5.01,
31
+ amount: 125.25,
32
+ customer_ref: {list_id: '08-02', full_name: 'project_two'},
33
+ billable_status: 'HasBeenBilled',
34
+ data_ext: {owner_id: 444444, data_ext_name: 'line_two', data_ext_value: 2},
35
+ }
36
+ end
10
37
 
11
38
  let(:bill) do
12
39
  BillQbxml::Add.factory(
@@ -15,7 +42,8 @@ describe BillQbxml do
15
42
  txn_date: '01/02/2018',
16
43
  due_date: '01/03/2018',
17
44
  ref_number: '305',
18
- expense_line_add: {account_ref: {full_name: 'Some item ref full name'}}
45
+ expense_line_add: {account_ref: {full_name: 'Some item ref full name'}},
46
+ item_line_add: [line_1, line_2],
19
47
  )
20
48
  end
21
49
 
@@ -30,15 +58,57 @@ describe BillQbxml do
30
58
  <VendorRef>
31
59
  <ListID>10</ListID>
32
60
  </VendorRef>
33
- <Memo>Hello</Memo>
34
61
  <TxnDate>01/02/2018</TxnDate>
35
- <RefNumber>305</RefNumber>
36
62
  <DueDate>01/03/2018</DueDate>
63
+ <RefNumber>305</RefNumber>
64
+ <Memo>Hello</Memo>
37
65
  <ExpenseLineAdd>
38
66
  <AccountRef>
39
67
  <FullName>Some item ref full name</FullName>
40
68
  </AccountRef>
41
69
  </ExpenseLineAdd>
70
+ <ItemLineAdd>
71
+ <ItemRef>
72
+ <ListID>01-01</ListID>
73
+ <FullName>one</FullName>
74
+ </ItemRef>
75
+ <Desc>line item 1</Desc>
76
+ <Quantity>50</Quantity>
77
+ <UnitOfMeasure>yards</UnitOfMeasure>
78
+ <Cost>15.001</Cost>
79
+ <Amount>750.05</Amount>
80
+ <CustomerRef>
81
+ <ListID>08-01</ListID>
82
+ <FullName>project_one</FullName>
83
+ </CustomerRef>
84
+ <BillableStatus>HasBeenBilled</BillableStatus>
85
+ <DataExt>
86
+ <OwnerID>55555</OwnerID>
87
+ <DataExtName>line_one</DataExtName>
88
+ <DataExtValue>1</DataExtValue>
89
+ </DataExt>
90
+ </ItemLineAdd>
91
+ <ItemLineAdd>
92
+ <ItemRef>
93
+ <ListID>01-02</ListID>
94
+ <FullName>two</FullName>
95
+ </ItemRef>
96
+ <Desc>line item 2</Desc>
97
+ <Quantity>25</Quantity>
98
+ <UnitOfMeasure>feet</UnitOfMeasure>
99
+ <Cost>5.01</Cost>
100
+ <Amount>125.25</Amount>
101
+ <CustomerRef>
102
+ <ListID>08-02</ListID>
103
+ <FullName>project_two</FullName>
104
+ </CustomerRef>
105
+ <BillableStatus>HasBeenBilled</BillableStatus>
106
+ <DataExt>
107
+ <OwnerID>444444</OwnerID>
108
+ <DataExtName>line_two</DataExtName>
109
+ <DataExtValue>2</DataExtValue>
110
+ </DataExt>
111
+ </ItemLineAdd>
42
112
  </BillAdd>
43
113
  </BillAddRq>
44
114
  </QBXMLMsgsRq>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qbwc_requests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Mondaini Calvão
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-13 00:00:00.000000000 Z
11
+ date: 2018-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: qbxml