Class: Spree::Integrations::Delhivery
- Inherits:
-
Spree::Integration
- Object
- Spree::Integration
- Spree::Integrations::Delhivery
- Defined in:
- app/models/spree/integrations/delhivery.rb
Class Method Summary collapse
-
.icon_path ⇒ Object
--- FIX ENDS HERE ---.
-
.integration_group ⇒ Object
This method is required for the Admin Index page sorting.
- .integration_name ⇒ Object
Instance Method Summary collapse
Class Method Details
.icon_path ⇒ Object
--- FIX ENDS HERE ---
29 30 31 |
# File 'app/models/spree/integrations/delhivery.rb', line 29 def self.icon_path "integration_icons/delhivery.png" # Make sure this image exists in your assets folder end |
.integration_group ⇒ Object
This method is required for the Admin Index page sorting
24 25 26 |
# File 'app/models/spree/integrations/delhivery.rb', line 24 def self.integration_group "Shipping" end |
.integration_name ⇒ Object
19 20 21 |
# File 'app/models/spree/integrations/delhivery.rb', line 19 def self.integration_name "Delhivery" end |
Instance Method Details
#api_url ⇒ Object
39 40 41 42 43 44 45 |
# File 'app/models/spree/integrations/delhivery.rb', line 39 def api_url if preferred_production_mode "https://track.delhivery.com" else "https://staging-express.delhivery.com" end end |
#preferred_api_token ⇒ Object
- Helper to get the token (used in your Client)
34 35 36 37 |
# File 'app/models/spree/integrations/delhivery.rb', line 34 def preferred_api_token # You can add logic here to decrypt if you want extra security preferences[:api_token] end |