Sha256: b92a3ef03759880eb8f0ea2627412a157fe697465fb0ed94ea77149d710d27fa
Contents?: true
Size: 552 Bytes
Versions: 5
Compression:
Stored size: 552 Bytes
Contents
module ShipCompliant # == ShipCompliant::SalesTaxRate # # SalesTaxRate is a value object to store sales tax information for freight # and products. # # tax_rate = SalesTaxRate.new(sales_tax_due: '123.45') # puts tax_rate.sales_tax_due #=> 123.45 class SalesTaxRate < Struct.new(:sales_tax) # Returns the +sales_tax_due+ as a float. def sales_tax_due sales_tax[:sales_tax_due].to_f end # Returns the +sales_tax_rate+ as a float. def sales_tax_rate sales_tax[:sales_tax_rate].to_f end end end
Version data entries
5 entries across 5 versions & 1 rubygems