xeroizer-float 2.15.3.7 → 2.15.3.8

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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.15.3.7
1
+ 2.15.3.8
data/lib/xeroizer/http.rb CHANGED
@@ -90,7 +90,7 @@ module Xeroizer
90
90
  response.plain_body
91
91
  when 400
92
92
  handle_error!(response, body)
93
- when 401, 503
93
+ when 401
94
94
  handle_oauth_error!(response)
95
95
  when 404
96
96
  handle_object_not_found!(response, url)
@@ -18,6 +18,7 @@ module Xeroizer
18
18
  string :tax_type
19
19
  decimal :tax_amount
20
20
  decimal :line_amount, :calculated => true
21
+ decimal :discount_rate
21
22
 
22
23
  has_many :tracking, :model_name => 'TrackingCategoryChild'
23
24
 
@@ -31,7 +32,7 @@ module Xeroizer
31
32
  def line_amount(summary_only = false)
32
33
  return attributes[:line_amount] if summary_only || @line_amount_set
33
34
 
34
- BigDecimal((quantity * unit_amount).to_s).round(2) if quantity && unit_amount
35
+ BigDecimal((quantity * unit_amount * (100.0 - discount_rate)).to_s).round(2) if quantity && unit_amount
35
36
  end
36
37
 
37
38
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "xeroizer-float"
8
- s.version = "2.15.3.7"
8
+ s.version = "2.15.3.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Wayne Robinson", "Philip Roberts"]
12
- s.date = "2013-02-13"
12
+ s.date = "2013-02-20"
13
13
  s.description = "Ruby library for the Xero accounting system API."
14
14
  s.email = "wayne.robinson@gmail.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xeroizer-float
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.3.7
4
+ version: 2.15.3.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-13 00:00:00.000000000 Z
13
+ date: 2013-02-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: builder