Module: SolidusShipwire::LineItem
- Defined in:
- app/models/line_item_decorator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
2 3 4 |
# File 'app/models/line_item_decorator.rb', line 2 def self.prepended(base) base.scope :on_shipwire, -> { base.joins(:variant).where.not(spree_variants: { shipwire_id: nil }) } end |
Instance Method Details
#to_shipwire ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/models/line_item_decorator.rb', line 6 def to_shipwire { sku: sku, quantity: quantity, commercialInvoiceValue: price, commercialInvoiceValueCurrency: 'USD' } end |