README.md in duty_calculator-0.0.5 vs README.md in duty_calculator-0.0.6
- old
+ new
@@ -35,10 +35,35 @@
config.debug = true
end
```
+### Get Calculation
+
+```
+duty_calculation = DutyCalculator::Calculation.get(params)
+
+0> duty_calculation.keys
+=> ["id", "item", "total_charges"]
+
+0> duty_calculation.total_charges.keys
+=> ["customs_value", "duty", "sales_tax", "total"]
+
+0> duty_calculation.total_charges.customs_value
+=> #<Hashie::Mash amount=#<Hashie::Mash currency="CAD" value=1556.0> name="FOB">
+
+0> duty_calculation.total_charges.sales_tax
+=> #<Hashie::Mash amount=#<Hashie::Mash currency="CAD" value=77.8> name="GST">
+
+0> duty_calculation.total_charges.duty
+=> #<Hashie::Mash amount=#<Hashie::Mash currency="CAD" value=0.0>>
+
+0> duty_calculation.total_charges.total
+=> #<Hashie::Mash amount=#<Hashie::Mash currency="CAD" value=77.8>>
+
+```
+
### Listing Categories
```ruby
2.1.2 :008 > DutyCalculator::Category.list_all
{
@@ -80,9 +105,14 @@
...
]
}
}
```
+
+## TODO
+
+- Port other objects to response nicer objects with `Hashie::Mash`
+- Coerce sub `Array` for `item` to use `Response` object
## Contributing
1. Fork it ( https://github.com/[my-github-username]/duty_calculator/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)