Skip to content

Commit

Permalink
add info to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mithereal committed Nov 23, 2022
1 parent 3e96c2a commit aaf7369
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ IO.puts(rate.price)
File.write!("#{label.tracking_number}.#{label.format}", Base.decode64!(label.image))
```

## Creating your own shipping modules
there are 2 ways of setting up your own shipping module either specifing it in the config if its in its own namespace or
creating a module in your project with following module naming conventions defmodule Shippex.Carrier.Modulename, and setting up the config carriers key to match the modules config() return. see the ups module for syntax examples
## TODO:

Carrier support:
Expand Down
2 changes: 1 addition & 1 deletion lib/shippex/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Shippex.Config do
@spec carriers() :: [Carrier.t()]
def carriers() do
config()
|> Enum.map_with_index(fn _config, i -> i end)
|> Enum.with_index(fn _config, i -> i end)
end

@spec config() :: Keyword.t() | none()
Expand Down

0 comments on commit aaf7369

Please sign in to comment.