This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe 'Transfers between shipments' do | |
let(:user) { stub_model(Spree::User, :email => "spree@example.com") } | |
#populated with order,email bill_address and ship_address, | |
let(:order) { FactoryGirl.create(:order_with_line_items) } | |
let(:a_variant){FactoryGirl.create(:variant)} | |
it 'should It should transfer items between shipments without adding line items' do | |
stock_location=order.shipments.first.stock_location | |
variant=stock_location.stock_items.first.variant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def open_adjustments | |
adjustments = @order.all_adjustments.where(state: 'closed') | |
adjustments.update_all(state: 'open') | |
flash[:success] = Spree.t(:all_adjustments_opened) | |
respond_with(@order) { |format| format.html { redirect_to :back } } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update!(target = nil) | |
return amount if closed? | |
if source.present? | |
amount = source.compute_amount(target || adjustable) | |
self.update_columns( | |
amount: amount, | |
updated_at: Time.now, | |
) | |
if promotion? | |
self.update_column(:eligible, source.promotion.eligible?(adjustable)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RAILS_ENV=production bundle exec rails runner "Spree::Config.check_for_spree_alerts = false" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "Searching" do | |
let!(:taxon) { create(:taxon, name: "shirts") } | |
let!(:taxon2) { create(:taxon, name: "shoes") } | |
let!(:a_product) { create(:product, taxons: [taxon], stores: [store], | |
description: "A product in english", price: 20) } | |
let!(:another_product) { create(:product, taxons: [taxon, taxon2], stores: [store], price: 80) } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /development_en/product/_search | |
{ | |
"query": { | |
"filtered": { | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"match_all": {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ListOfEmails> | |
<Email> | |
<EmailOID>57712b2a-ab68-4d59-94e9-fd22aaab7c89</EmailOID> | |
<Sender>Jai King <herqueles3@gmail.com></Sender> | |
<DateTime>2013-09-06T19:16:22.308Z</DateTime> | |
<Subject>test subject</Subject> | |
<ListOfDocuments/> | |
</Email> | |
<Email> | |
<EmailOID>75a0b993-186b-49a5-968f-111cf985866f</EmailOID> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788) | |
Caused by: org.mule.api.config.ConfigurationException: Line 43 in XML document from URL [file:/usr/lib/mule-standalone-3.4.0/apps/itemize-esb-1.0.0-SNAPSHOT/main.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'amqp:connector'. One of '{"http://www.springframework.org/schema/beans":beans, "http://www.springframework.org/schema/beans":bean, "http://www.springframework.org/schema/context":property-placeholder, "http://www.springframework.org/schema/beans":ref, "http://www.mulesoft.org/schema/mule/core":global-property, "http://www.mulesoft.org/schema/mule/core":configuration, "http://www.mulesoft.org/schema/mule/core":notifications, "http://www.mulesoft.org/schema/mule/core":abstract-extension, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-extension, "http://www.mulesoft.org/schema/mule/core":abstract-agent, "http:// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="net_suite_test_flow"> | |
<http:inbound-endpoint ref="netsuite_test_endpoint" exchange-pattern="request-response"/> | |
<logger message="#[groovy:return message.toString();]" level="INFO"/> | |
<echo-component/> | |
<netsuite:get-record recordType="INVENTORY_ITEM" id="#[header:INBOUND:internal_id]"/> | |
<logger message="#[groovy:return message.toString();]" level="INFO"/> | |
<expression-transformer> | |
<return-argument evaluator="string" expression="Item: #[groovy:message.payload.storeDescription]"/> | |
</expression-transformer> | |
<netsuite:add-list recordType="CASH_SALE"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static groovyx.net.http.ContentType.JSON | |
import groovyx.net.http.RESTClient | |
import static groovyx.net.http.Method.GET | |
import static groovyx.net.http.Method.PUT | |
import static groovyx.net.http.ContentType.TEXT | |
import static groovyx.net.http.ContentType.URLENC | |
@Grab(group = 'org.codehaus.groovy.modules.http-builder', | |
module = 'http-builder', version = '0.5.2') |