fba_fee_calculator 1.0.2 → 1.0.3

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: ea51c61787480ad06e9e1f39bebe44d5a9f1632c
4
- data.tar.gz: 185c58f032f935fb4983a479517d460ed4d11088
3
+ metadata.gz: 2d533cd033519310e499ccad37c699e28752b911
4
+ data.tar.gz: 820427a1c03dd97025290ab964cdcf7cdb6f7e8e
5
5
  SHA512:
6
- metadata.gz: b4cf51c8a12b929419f853358716028292ae07e66efb6a5412d102fcb9ee3eafb756d79729cd4222373192913064376d5e0c3f854863c59610dcaf6898202058
7
- data.tar.gz: b0f474cc99b8fb0bef9b8b83fc3027e0a616f1d82a652d66acad705f0bf6259d237dd831ae40397e8fd16a01de82826939f4bd7658d299fcba6a40094b19a028
6
+ metadata.gz: 84d494f1a9aa9761efd316c40e7d88d3ec68c83a2c8a1136975b29f81edc153973acb4eeedd585a4558a92370c66612c8fd655c76038a1d3aea00a07b468d0d3
7
+ data.tar.gz: 1a9af80ea5eb13fde061fc5170c2f202e49e0ac9c86b0795e14bcdd499d5dd34a4dec8d3dd1ad21f421a62356e932cb4a6aa370f140e88fdbcacf2a97d239b0f
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
data/README.md CHANGED
@@ -1,13 +1,10 @@
1
- # FbaFeeCalculator
1
+ # FBA Fee Calculator
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fba_fee_calculator`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem Version](https://badge.fury.io/rb/fba_fee_calculator.svg)](https://badge.fury.io/rb/fba_fee_calculator)
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- https://sellercentral.amazon.com/hz/fba/profitabilitycalculator/index
8
- https://github.com/hamptus/fbacalculator/blob/master/fbacalculator%2Ffbacalculator.py
9
- https://github.com/MattJGlick/amazon_fba_fee_calculator/blob/master/index.js
5
+ This gem provides most of the information provided by Amazon's [FBA Profitability Calculator](https://sellercentral.amazon.com/hz/fba/profitabilitycalculator/index)
10
6
 
7
+ Inspired by [hamptus](https://github.com/hamptus/fbacalculator)
11
8
 
12
9
  ## Installation
13
10
 
@@ -27,7 +24,27 @@ Or install it yourself as:
27
24
 
28
25
  ## Usage
29
26
 
30
- TODO: Write usage instructions here
27
+ ```ruby
28
+ results = FbaFeeCalculator.calculate(
29
+ price: 29.99,
30
+ category: "Outdoors",
31
+ weight: 1.3, # lbs
32
+ dimensions: [4.3, 5.7, 8.3] # inches
33
+ )
34
+
35
+ results.size_category # => "Standard"
36
+ results.size_tier # => "LRG_STND"
37
+ results.revenue_subtotal # => 29.99
38
+ results.amazon_referral_fee # => 4.50
39
+ results.variable_closing_fee # => 0.00
40
+ results.order_handling # => 1.00
41
+ results.pick_and_pack # => 1.06
42
+ results.weight_handling # => 1.95
43
+ results.monthly_storage # => 0.06
44
+ results.fulfillment_cost_subtotal # => 4.07
45
+ results.cost_subtotal # => -8.57
46
+ results.margin_impact # => 21.42
47
+ ```
31
48
 
32
49
  ## Development
33
50
 
@@ -37,5 +54,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
37
54
 
38
55
  ## Contributing
39
56
 
40
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fba_fee_calculator.
57
+ Bug reports and pull requests are welcome on GitHub at https://github.com/sellerated/fba_fee_calculator.
41
58
 
@@ -21,7 +21,7 @@ module FbaFeeCalculator
21
21
  return "LRG_STND"
22
22
  end
23
23
  else
24
- girth_length = get_girth_length(dimensions)
24
+ girth_length = get_girth_and_length(dimensions)
25
25
  if [ (girth_length > 165),
26
26
  (weight > 150),
27
27
  (dimensions.max > 108) ].any?
@@ -1,3 +1,3 @@
1
1
  module FbaFeeCalculator
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fba_fee_calculator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Berry
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-29 00:00:00.000000000 Z
11
+ date: 2016-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -95,7 +95,6 @@ files:
95
95
  - Rakefile
96
96
  - bin/console
97
97
  - bin/setup
98
- - fba_fee_calculator-1.0.1.gem
99
98
  - fba_fee_calculator.gemspec
100
99
  - lib/fba_fee_calculator.rb
101
100
  - lib/fba_fee_calculator/fba_fee_calculation.rb
Binary file