Class: ErpIntegration::SalesOrderLine

Inherits:
Resource
  • Object
show all
Defined in:
lib/erp_integration/sales_order_line.rb

Overview

The ‘ErpIntegration::SalesOrderLine` exposes an uniformed API for interaction with third-party ERP vendors.

Instance Attribute Summary collapse

Attributes inherited from Resource

#raw_api_response

Instance Method Summary collapse

Methods inherited from Resource

adapter, adapter_klass, adapter_path, adapter_type, #assign_attributes, #initialize, #method_missing, resource_name, respond_to_missing?

Methods included from Resources::Persistence

#destroy, included, #persisted?, #update

Methods included from Resources::Validations

#errors, #valid?, #validate_with

Constructor Details

This class inherits a constructor from ErpIntegration::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ErpIntegration::Resource

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def amount
  @amount
end

#attachmentsObject

Returns the value of attribute attachments.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def attachments
  @attachments
end

#channel_identifierObject

Returns the value of attribute channel_identifier.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def channel_identifier
  @channel_identifier
end

#create_dateObject

Returns the value of attribute create_date.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def create_date
  @create_date
end

#create_uidObject

Returns the value of attribute create_uid.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def create_uid
  @create_uid
end

#delivery_addressObject

Returns the value of attribute delivery_address.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def delivery_address
  @delivery_address
end

#delivery_dateObject

Returns the value of attribute delivery_date.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def delivery_date
  @delivery_date
end

#delivery_modeObject

Returns the value of attribute delivery_mode.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def delivery_mode
  @delivery_mode
end

#descriptionObject

Returns the value of attribute description.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def description
  @description
end

#discountObject

Returns the value of attribute discount.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def discount
  @discount
end

#gift_messageObject

Returns the value of attribute gift_message.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def gift_message
  @gift_message
end

#gross_profit_cpny_ccObject

Returns the value of attribute gross_profit_cpny_cc.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def gross_profit_cpny_cc
  @gross_profit_cpny_cc
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def id
  @id
end

#is_gift_cardObject

Returns the value of attribute is_gift_card.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def is_gift_card
  @is_gift_card
end

#list_priceObject

Returns the value of attribute list_price.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def list_price
  @list_price
end

#listing_skuObject

Returns the value of attribute listing_sku.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def listing_sku
  @listing_sku
end

#metadataObject

Returns the value of attribute metadata.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def 
  @metadata
end

#noteObject

Returns the value of attribute note.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def note
  @note
end

#optionsObject

Returns the value of attribute options.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def options
  @options
end

#productObject

Returns the value of attribute product.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def product
  @product
end

#purhcase_requestObject

Returns the value of attribute purhcase_request.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def purhcase_request
  @purhcase_request
end

#quantityObject

Returns the value of attribute quantity.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def quantity
  @quantity
end

#quantity_canceledObject

Returns the value of attribute quantity_canceled.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def quantity_canceled
  @quantity_canceled
end

#quantity_reservedObject

Returns the value of attribute quantity_reserved.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def quantity_reserved
  @quantity_reserved
end

#quantity_shippedObject

Returns the value of attribute quantity_shipped.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def quantity_shipped
  @quantity_shipped
end

#return_reasonObject

Returns the value of attribute return_reason.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def return_reason
  @return_reason
end

#saleObject

Returns the value of attribute sale.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def sale
  @sale
end

#sequenceObject

Returns the value of attribute sequence.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def sequence
  @sequence
end

#shipping_dateObject

Returns the value of attribute shipping_date.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def shipping_date
  @shipping_date
end

#taxesObject

Returns the value of attribute taxes.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def taxes
  @taxes
end

#typeObject

Returns the value of attribute type.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def type
  @type
end

#unitObject

Returns the value of attribute unit.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def unit
  @unit
end

#unit_priceObject

Returns the value of attribute unit_price.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def unit_price
  @unit_price
end

#warehouseObject

Returns the value of attribute warehouse.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def warehouse
  @warehouse
end

#write_dateObject

Returns the value of attribute write_date.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def write_date
  @write_date
end

#write_uidObject

Returns the value of attribute write_uid.



7
8
9
# File 'lib/erp_integration/sales_order_line.rb', line 7

def write_uid
  @write_uid
end

Instance Method Details

#adjust_quantity(sales_channel, channel_identifier, sku, quantity, quantity_canceled) ⇒ Object



20
21
22
# File 'lib/erp_integration/sales_order_line.rb', line 20

def adjust_quantity(sales_channel, channel_identifier, sku, quantity, quantity_canceled)
  self.class.adapter.adjust_quantity(sales_channel, channel_identifier, sku, quantity, quantity_canceled)
end

#cancel(id) ⇒ Object



16
17
18
# File 'lib/erp_integration/sales_order_line.rb', line 16

def cancel(id)
  self.class.adapter.cancel(id)
end