quickbooks-ruby 0.4.8 → 0.4.9

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: 8accb99a9e2e28cd2274f2c1c45dfc9bfabe7817
4
- data.tar.gz: 4ba3e432402d2b07533f5ff819bf8e62fe4a5dff
3
+ metadata.gz: 4bba52e177d4dbff7bd3eef21f360891e3f750b9
4
+ data.tar.gz: 377858e1b3e459b7258c38051009ae2ef8f1ec23
5
5
  SHA512:
6
- metadata.gz: 832f43c2df17cdd71f82b82475aa48f7046ec94b8f0c437746a0d2dcc83705119f5fb41494785f9eda893351ab8bd54b0a412fec9403fb3c63f814acc64c1f68
7
- data.tar.gz: 6127fb270adce5d42790d5c1ec29507a42a9fc4c3be1db2beaf3498e4177f6b5f23ed5ec4b91be94daa197e92088a28ed8efe7592a44cd63b0c26f8599ee4a6a
6
+ metadata.gz: 18e4eef7be9a939a815230b622c987276b8d7bef706507d883e13d2a6d6da55c7db32c8f66a23a38d22dd0a7c5e1da8a99ca7336b6dd03c5189e5d25e22bda51
7
+ data.tar.gz: 37ad15a142e2766e932e7a055b07fb29857c3945ff502218fbb82dd548b13dd9dde9c5e2ade1319b1cb48b966d644cbaeeb715943842e05052ec1406bf63f0f2
@@ -20,6 +20,7 @@ class Quickbooks::Model::BatchRequest < Quickbooks::Model::BaseModel
20
20
  xml_accessor :payment, from: "Payment", as: Quickbooks::Model::Payment
21
21
  xml_accessor :time_activity, from: "TimeActivity", as: Quickbooks::Model::TimeActivity
22
22
  xml_accessor :refund_receipt, from: "RefundReceipt", as: Quickbooks::Model::RefundReceipt
23
+ xml_accessor :journal_entry, from: "JournalEntry", as: Quickbooks::Model::JournalEntry
23
24
  end
24
25
 
25
26
  XML_COLLECTION_NODE = "IntuitBatchRequest"
@@ -19,6 +19,7 @@ class Quickbooks::Model::BatchResponse < Quickbooks::Model::BaseModel
19
19
  xml_accessor :payment, from: "Payment", as: Quickbooks::Model::Payment
20
20
  xml_accessor :time_activity, from: "TimeActivity", as: Quickbooks::Model::TimeActivity
21
21
  xml_accessor :refund_receipt, from: "RefundReceipt", as: Quickbooks::Model::RefundReceipt
22
+ xml_accessor :journal_entry, from: "JournalEntry", as: Quickbooks::Model::JournalEntry
22
23
 
23
24
  def fault?
24
25
  fault
@@ -20,6 +20,7 @@ module Quickbooks
20
20
  xml_accessor :department_ref, :from => 'DepartmentRef', :as => BaseReference
21
21
  xml_accessor :bill_email, :from => 'BillEmail', :as => EmailAddress
22
22
  xml_accessor :bill_address, :from => 'BillAddr', :as => PhysicalAddress
23
+ xml_accessor :delivery_info, :from => 'DeliveryInfo', :as => DeliveryInfo
23
24
  xml_accessor :ship_address, :from => 'ShipAddr', :as => PhysicalAddress
24
25
  xml_accessor :po_number, :from => 'PONumber'
25
26
  xml_accessor :ship_method_ref, :from => 'ShipMethodRef', :as => BaseReference
@@ -54,9 +55,10 @@ module Quickbooks
54
55
  validate :line_item_size
55
56
  validate :document_numbering
56
57
 
57
- def email=(email)
58
- self.bill_email = EmailAddress.new(email)
58
+ def billing_email_address=(email_address_string)
59
+ self.bill_email = EmailAddress.new(email_address_string)
59
60
  end
61
+ alias_method :email=, :billing_email_address= # backward backward compatibility to v0.4.6
60
62
 
61
63
  end
62
64
  end
@@ -12,6 +12,17 @@ module Quickbooks
12
12
  response.plain_body
13
13
  end
14
14
 
15
+ def send(sr, email_address=nil)
16
+ query = email_address.present? ? "?sendTo=#{email_address}" : ""
17
+ url = "#{url_for_resource(model::REST_RESOURCE)}/#{sr.id}/send#{query}"
18
+ response = do_http_post(url,{})
19
+ if response.code.to_i == 200
20
+ model.from_xml(parse_singular_entity_response(model, response.plain_body))
21
+ else
22
+ nil
23
+ end
24
+ end
25
+
15
26
  def void(sales_receipt, options = {})
16
27
  raise Quickbooks::InvalidModelException.new(sales_receipt.errors.full_messages.join(',')) unless sales_receipt.valid?
17
28
  xml = sales_receipt.to_xml_ns(options)
@@ -1,5 +1,5 @@
1
1
  module Quickbooks
2
2
 
3
- VERSION = "0.4.8"
3
+ VERSION = "0.4.9"
4
4
 
5
5
  end
@@ -67,6 +67,7 @@ require 'quickbooks/model/invoice_group_line_detail'
67
67
  require 'quickbooks/model/name_value'
68
68
  require 'quickbooks/model/company_info'
69
69
  require 'quickbooks/model/customer'
70
+ require 'quickbooks/model/delivery_info'
70
71
  require 'quickbooks/model/sales_receipt'
71
72
  require 'quickbooks/model/payment'
72
73
  require 'quickbooks/model/payment_method'
@@ -90,7 +91,6 @@ require 'quickbooks/model/purchase'
90
91
  require 'quickbooks/model/purchase_order'
91
92
  require 'quickbooks/model/vendor_credit'
92
93
  require 'quickbooks/model/estimate'
93
- require 'quickbooks/model/delivery_info'
94
94
  require 'quickbooks/model/invoice'
95
95
  require 'quickbooks/model/tax_rate'
96
96
  require 'quickbooks/model/tax_rate_detail'
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.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Caughlan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-14 00:00:00.000000000 Z
11
+ date: 2017-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth