This file contains hidden or 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
from simple_salesforce import Salesforce, SalesforceLogin | |
from simple_salesforce import SFType | |
import base64 | |
import requests | |
import json | |
import os | |
def lambda_handler(event, context): |
This file contains hidden or 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
trigger GoogleOrderPubSub on Order (after insert, after update) { | |
ID jobID = System.enqueuejob(new GoogleOrderPubSubQueueable(Trigger.New)); | |
system.debug('GoogleOrderPubSub Trigger ' + jobID); | |
} |
This file contains hidden or 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 class GoogleOrderPubSubQueueable implements Queueable, Database.AllowsCallouts { | |
public List<Order> orderList; | |
public GoogleOrderPubSubQueueable(List<Order> order){ | |
this.orderList=order; | |
} | |
public void execute(QueueableContext context) { | |
This file contains hidden or 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 class GCPAuthManagementService{ | |
// Class to deserialise response from the Google token URL and get the | |
// ID Token | |
public class GoogleAuthResponse { | |
public String id_token; | |
} | |
/** |
This file contains hidden or 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
google-cloud-pubsub |
This file contains hidden or 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 os | |
import json | |
from google.cloud import pubsub_v1 | |
def publish_message(request): | |
#get JSON from HTTP POST | |
request_json = request.get_json() | |
#print request_json |
This file contains hidden or 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
# Function dependencies, for example: | |
# package>=version | |
requests>=2.20.0 | |
simple-salesforce>=0.74.2 | |
google-cloud-logging==1.11.0 | |
google-cloud-secret-manager==0.2.0 |
This file contains hidden or 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
from simple_salesforce import Salesforce, SalesforceLogin | |
from simple_salesforce import SFType | |
from google.cloud import secretmanager | |
import base64 | |
import requests | |
import json | |
import os | |
def main(event, context): |
This file contains hidden or 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
# Function dependencies, for example: | |
# package>=version | |
requests>=2.20.0 | |
simple-salesforce>=0.74.2 | |
google-cloud-logging==1.11.0 | |
google-cloud-secret-manager==0.2.0 |
This file contains hidden or 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
from simple_salesforce import Salesforce, SalesforceLogin | |
from simple_salesforce import SFType | |
from google.cloud import secretmanager | |
import requests | |
import json | |
import os | |
def main(initial_request): | |
sftype_object = os.environ["sftype_object"] |
NewerOlder