Class: AvataxClient::Response::LineItem

Inherits:
Base
  • Object
show all
Defined in:
lib/avatax_client/response/line_item.rb

Overview

Represents a line item on a Transaction. Responsible for reporting dollar amounts, quantity and tax code.

Instance Method Summary collapse

Instance Method Details

#ratefloat

Effective tax rate is determined by summing the rate from the details.

Returns:

  • (float)


18
19
20
# File 'lib/avatax_client/response/line_item.rb', line 18

def rate
  @rate ||= details.map(&:rate).reduce(&:+)
end