AeliaWCEU_VAT_AssistantDefinitions

Implements a base class to store and handle the messages returned by the plugin.

Defined (1)

The class is defined in the following location(s).

/src/lib/classes/definitions/definitions.php  
  1. class Definitions { 
  2. // @var string The menu slug for plugin's settings page. 
  3. const MENU_SLUG = 'wc_aelia_eu_vat_assistant'; 
  4. // @var string The plugin slug 
  5. const PLUGIN_SLUG = 'wc-aelia-eu-vat-assistant'; 
  6. // @var string The plugin text domain 
  7. const TEXT_DOMAIN = 'wc-aelia-eu-vat-assistant'; 
  8.  
  9. // GET/POST Arguments 
  10. const ARG_COUNTRY = 'country'; 
  11. const ARG_VAT_NUMBER = 'vat_number'; 
  12. const ARG_LOCATION_SELF_CERTIFICATION = 'customer_location_self_certified'; 
  13. const ARG_TAX_TYPE = 'tax_type'; 
  14. const ARG_EXCHANGE_RATES_TYPE = 'exchange_rates_type'; 
  15. const ARG_REFUNDS_PERIOD = 'refunds_period'; 
  16. const ARG_INCLUDE_REFUNDED_ORDERS = 'include_refunded_orders'; 
  17. const ARG_COLLECT_ORDER_VAT_INFO = 'collect_order_vat_info'; 
  18. const ARG_COLLECT_ORDER_ID = 'order_id'; 
  19.  
  20. // Session constants 
  21.  
  22. // Transients 
  23. const TRANSIENT_EU_NUMBER_VALIDATION_RESULT = 'aelia_wc_eu_vat_validation_'; 
  24. const TRANSIENT_EU_VAT_RATES = 'aelia_wc_eu_vat_rates'; 
  25.  
  26. // Error codes 
  27. const RES_OK = 0; 
  28. const ERR_INVALID_TEMPLATE = 1001; 
  29. const ERR_INVALID_SOURCE_CURRENCY = 1103; 
  30. const ERR_INVALID_DESTINATION_CURRENCY = 1104; 
  31. const ERR_INVALID_EU_VAT_NUMBER = 5001; 
  32. const ERR_COULD_NOT_VALIDATE_VAT_NUMBER = 5002; 
  33.  
  34. const YES = 'yes'; 
  35. const NO = 'no'; 
  36. const ALL = 'all'; 
  37. const VAT_NUMBER_VALIDATION_NO_NUMBER = 'no-number'; 
  38. const VAT_NUMBER_VALIDATION_VALID = 'valid'; 
  39. const VAT_NUMBER_VALIDATION_NOT_VALID = 'not-valid'; 
  40. const VAT_NUMBER_VALIDATION_NON_EU = 'non-eu'; 
  41. const VAT_NUMBER_COULD_NOT_BE_VALIDATED = 'could-not-be-validated'; 
  42. const VAT_NUMBER_ENTERED_MANUALLY_NOT_VALIDATED = 'entered-manually-not-validated'; 
  43.  
  44. // Argument values 
  45. // EU VAT Report 
  46. const TAX_MOSS_ONLY = 'moss_only'; 
  47. const TAX_NON_MOSS_ONLY = 'non_moss_only'; 
  48. const TAX_ALL = 'all_tax_types'; 
  49. const FX_SAVED_WITH_ORDER = 'saved_with_order'; 
  50. const FX_ECB_FOR_QUARTER = 'ecb_rates_for_quarter'; 
  51.  
  52. const REFUNDS_FOR_ORDERS_IN_PERIOD = 'refunds_for_orders_in_period'; 
  53. const REFUNDS_IN_PERIOD = 'refunds_granted_in_period'; 
  54.  
  55. // Sales Report 
  56. const SALES_EU_ONLY = 'eu_sales_only'; 
  57. const SALES_NON_EU_ONLY = 'non_eu_sales_only'; 
  58. const SALES_WITH_VAT = 'sales_with_vat'; 
  59. const SALES_WITHOUT_VAT = 'sales_without_vat'; 
  60.  
  61. // Fields 
  62. const FIELD_VIES_PRODUCT_IS_SERVICE = '_vies_product_is_service'; 
  63. const FIELD_VAT_NUMBER = 'vat_number';