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
*/ | |
public String login() { | |
UserAuth userAuth = new UserAuth(); | |
userAuth.setUserName(username); | |
userAuth.setPassword(password); | |
try { | |
EntryValue loginRes = wsClient.login(userAuth, Class.class.getName(), new NameValueList()); | |
return loginRes.getId(); | |
} catch (Exception e) { | |
throw new RuntimeException(e.getMessage()); |
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
/** | |
* Mule Sugar CRM Connector | |
* | |
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | |
* | |
* The software in this package is published under the terms of the CPAL v1.0 | |
* license, a copy of which has been included with this distribution in the | |
* LICENSE.txt file. | |
*/ |
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') |
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
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
<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
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
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
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
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)) |