Coder Social home page Coder Social logo

mirumee / django-prices-vatlayer Goto Github PK

View Code? Open in Web Editor NEW
15.0 22.0 15.0 81 KB

Vatlayer API support for django-prices

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
python price money tax taxes vat vatlayer-api currency currencies django-prices

django-prices-vatlayer's People

Contributors

artursmet avatar korycins avatar maarcingebala avatar maclake avatar mad-anne avatar nyankiyoshi avatar patrys avatar rafalp avatar szewczykmira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-prices-vatlayer's Issues

Drop cache usage

django-prices-vatlayer uses cache logic in utils::create_objects_from_json and utils:: get_tax_rates_for_country. It seems that this is not a mandatory step and it doesn't give users any benefits. We should drop them.

VatLayer API limit calls for free account

Hi,

We love saleor. Especially since the new react-storefront boilerplate. ๐Ÿ‘ ๐Ÿš€ And the new SDK with with the outsourcing of the declaration of ApolloClient.
We are starting to have some experience with saleor (build a store with more than 4000 products and integrate with Sage).
And we hope to be more active to the community.

We have identify a little issue with VatLayer free account.
django-prices-vatlayer v1.1.0
saleor v3
VatLayer : Free Account

When we "fetch taxes" from Dashboard Taxes page, we have an unexpected error.

The fetch run 2 calls to the vatlayer API.

  • fetch_vat_rates
    All good. The response contain the data.

  • fetch_rate_types
    We got a error from API :
    {'success': False, 'error': {'code': 106, 'type': 'rate_limit_reached', 'info': 'You have exceeded the maximum rate limitation allowed on your subscription plan. Please refer to the "Rate Limits" section of the API Documentation for details. '}}

When we comment the first call in your package, the second one run correctly and we could view rate_types in database.
It seems that VatLayer limit the number of calls for a specific time.

Temporise between the 2 calls ? Not really good for the paid account
Add 2 buttons in the Admin Dashboard (fetch rates types, fetch vat rates) ? Not really ergonomic.

Hope this help,
Best,
Sebastien.

Make HTTPS optional for fetching

Hi!

A little issue when fetching the tax rates with DEBUG = False, if fetches tax rates but the user may not have a paid vat-layer account.

django.core.exceptions.ImproperlyConfigured: Access Restricted - Your current Subscription Plan does not support HTTPS Encryption.

cf.

PROTOCOL = 'http://' if settings.DEBUG else 'https://'
DEFAULT_URL = PROTOCOL + 'apilayer.net/api/'

Proposed solution

We could add a new settings key VATLAYER_USE_HTTPS set to False by default as the paid user may be looking to ensure HTTPS.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.