Module: Vpago::ShipmentDecorator
- Defined in:
- app/models/vpago/shipment_decorator.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#cost_with_vendor_adjustment_total ⇒ Object
there is no commission for shipment yet.
- #required_payway_payout? ⇒ Boolean
- #vendor_adjustment_total ⇒ Object
Class Method Details
.prepended(base) ⇒ Object
3 4 5 |
# File 'app/models/vpago/shipment_decorator.rb', line 3 def self.prepended(base) base.include ::Vpago::Payoutable end |
Instance Method Details
#cost_with_vendor_adjustment_total ⇒ Object
there is no commission for shipment yet. so amount that vendor expected is cost + their adjustments.
13 14 15 |
# File 'app/models/vpago/shipment_decorator.rb', line 13 def cost_with_vendor_adjustment_total cost + vendor_adjustment_total end |
#required_payway_payout? ⇒ Boolean
7 8 9 |
# File 'app/models/vpago/shipment_decorator.rb', line 7 def required_payway_payout? selected_shipping_rate.required_active_payout_profiles.payway.exists? end |
#vendor_adjustment_total ⇒ Object
17 18 19 |
# File 'app/models/vpago/shipment_decorator.rb', line 17 def vendor_adjustment_total adjustments.handle_by_vendor.total end |