quickbooks-ruby 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11f05fc5c384553644ba7ba2ed461c898049b191
4
- data.tar.gz: 7718c7501cc5a64095e7646c9ca3085adf8a5d9c
3
+ metadata.gz: 24e06887a6e813d61012ea901b56c7437190f2fd
4
+ data.tar.gz: 91f01e4dc65fe45baa475ea7f32c88e4e0c02fdf
5
5
  SHA512:
6
- metadata.gz: 4c7e44232ac11a31cc42fcdf0cd6c9639eae32a3840b08d232e387f626448106549db1258975155539ed5762c298d2e9e0e9d9c0510029842112bbcb0a40b76d
7
- data.tar.gz: 4d08d07490bbe459d6a05741d39cb3c8581a83df8fb9e218c86fe653796ab3bc0074d1f554ec331f8d930b36d3e88554d6c7b9f88c1327324ab60963fa8ce6b5
6
+ metadata.gz: 4ebb387c402a60a882433c46788276c627f91d7bd70a92ebe501a0a2bdc2d02bac8625ad354cace62a2e5c4ae781fb0244e7da911c057d6b4f38f3bc597e1ff5
7
+ data.tar.gz: 0925d3076e903d837a95072f269fbd452451029fd7bcaaba0182a6712546ddcfa4794e2543ac7647bd5d4ff94e14c766e359b63d23e7777d68d713fc06fd831d
@@ -33,6 +33,7 @@ require 'quickbooks/model/attachable'
33
33
  require 'quickbooks/model/custom_field'
34
34
  require 'quickbooks/model/sales_item_line_detail'
35
35
  require 'quickbooks/model/sub_total_line_detail'
36
+ require 'quickbooks/model/description_line_detail'
36
37
  require 'quickbooks/model/department'
37
38
  require 'quickbooks/model/discount_line_detail'
38
39
  require 'quickbooks/model/discount_override'
@@ -0,0 +1,7 @@
1
+ module Quickbooks
2
+ module Model
3
+ class DescriptionLineDetail < BaseModel
4
+
5
+ end
6
+ end
7
+ end
@@ -9,6 +9,8 @@ module Quickbooks
9
9
  PAYMENT_LINE_DETAIL = 'PaymentLineDetail'
10
10
  DISCOUNT_LINE_DETAIL = 'DiscountLineDetail'
11
11
  INVOICE_GROUP_LINE_DETAIL = 'GroupLineDetail'
12
+ DESCRIPTION_LINE_DETAIL = 'DescriptionLineDetail'
13
+ DESCRIPTION_DETAIL_TYPE = 'DescriptionOnly'
12
14
 
13
15
  xml_accessor :id, :from => 'Id'
14
16
  xml_accessor :line_num, :from => 'LineNum', :as => Integer
@@ -17,11 +19,12 @@ module Quickbooks
17
19
  xml_accessor :detail_type, :from => 'DetailType'
18
20
 
19
21
  #== Various detail types
20
- xml_accessor :sales_line_item_detail, :from => 'SalesItemLineDetail', :as => SalesItemLineDetail
21
- xml_accessor :sub_total_line_detail, :from => 'SubTotalLineDetail', :as => SubTotalLineDetail
22
- xml_accessor :payment_line_detail, :from => 'PaymentLineDetail', :as => PaymentLineDetail
23
- xml_accessor :discount_line_detail, :from => 'DiscountLineDetail', :as => DiscountLineDetail
22
+ xml_accessor :sales_line_item_detail, :from => SALES_LINE_ITEM_DETAIL, :as => SalesItemLineDetail
23
+ xml_accessor :sub_total_line_detail, :from => SUB_TOTAL_LINE_DETAIL, :as => SubTotalLineDetail
24
+ xml_accessor :payment_line_detail, :from => PAYMENT_LINE_DETAIL, :as => PaymentLineDetail
25
+ xml_accessor :discount_line_detail, :from => DISCOUNT_LINE_DETAIL, :as => DiscountLineDetail
24
26
  xml_accessor :group_line_detail, :from => INVOICE_GROUP_LINE_DETAIL, :as => InvoiceGroupLineDetail
27
+ xml_accessor :description_line_detail, :from => DESCRIPTION_LINE_DETAIL, :as => DescriptionLineDetail
25
28
 
26
29
  def group_line_detail?
27
30
  detail_type.to_s == INVOICE_GROUP_LINE_DETAIL
@@ -39,6 +42,12 @@ module Quickbooks
39
42
  detail_type.to_s == DISCOUNT_LINE_DETAIL
40
43
  end
41
44
 
45
+ def description_only?
46
+ # The detail type for a description-only line detail differs slightly
47
+ # from the node name (DescriptionOnly vs DescriptionLineDetail)
48
+ detail_type.to_s == DESCRIPTION_DETAIL_TYPE
49
+ end
50
+
42
51
  def sales_item!
43
52
  self.detail_type = SALES_LINE_ITEM_DETAIL
44
53
  self.sales_line_item_detail = SalesItemLineDetail.new
@@ -66,6 +75,14 @@ module Quickbooks
66
75
 
67
76
  yield self.discount_line_detail if block_given?
68
77
  end
78
+
79
+ def description_only!
80
+ self.detail_type = DESCRIPTION_DETAIL_TYPE
81
+ self.description_line_detail = DescriptionLineDetail.new
82
+
83
+ yield self.description_line_detail if block_given?
84
+ end
85
+
69
86
  end
70
87
  end
71
88
  end
@@ -1,5 +1,5 @@
1
1
  module Quickbooks
2
2
 
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.1"
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quickbooks-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Caughlan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-25 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth
@@ -198,6 +198,7 @@ files:
198
198
  - lib/quickbooks/model/deposit.rb
199
199
  - lib/quickbooks/model/deposit_line_detail.rb
200
200
  - lib/quickbooks/model/deposit_line_item.rb
201
+ - lib/quickbooks/model/description_line_detail.rb
201
202
  - lib/quickbooks/model/discount_line_detail.rb
202
203
  - lib/quickbooks/model/discount_override.rb
203
204
  - lib/quickbooks/model/document_numbering.rb