module Gentle::Documents::Request::HashConverter
Public Instance Methods
bill_to_hash()
click to toggle source
# File lib/gentle/documents/request/hash_converter.rb, line 40 def bill_to_hash { 'Company' => bill_address.company, 'Contact' => full_name, 'Address1' => bill_address.address1, 'Address2' => bill_address.address2, 'City' => bill_address.city, 'State' => bill_address.state.name, 'PostalCode' => bill_address.zipcode, 'Country' => bill_address.country.name } end
line_item_hash(item)
click to toggle source
# File lib/gentle/documents/request/hash_converter.rb, line 16 def line_item_hash(item) { 'ItemNumber' => item.sku, 'Line' => item.id, 'QuantityOrdered' => item.quantity, 'QuantityToShip' => item.quantity, 'UOM' => 'EA', 'Price' => item.price } end
part_line_item_hash(part)
click to toggle source
# File lib/gentle/documents/request/hash_converter.rb, line 5 def part_line_item_hash(part) { 'ItemNumber' => part.variant.sku, 'Line' => part.variant.id, 'QuantityOrdered' => part.line_item.quantity, 'QuantityToShip' => part.line_item.quantity, 'UOM' => 'EA', 'Price' => part.variant.price } end
ship_to_hash()
click to toggle source
# File lib/gentle/documents/request/hash_converter.rb, line 27 def ship_to_hash { 'Company' => ship_address.company, 'Contact' => full_name, 'Address1' => ship_address.address1, 'Address2' => ship_address.address2, 'City' => ship_address.city, 'State' => ship_address.state.name, 'PostalCode' => ship_address.zipcode, 'Country' => ship_address.country.name } end