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
<?php | |
/** | |
* Plugin Name: Desk.com Multipass | |
* Plugin URI: https://github.com/tstachl/wp-desk_multipass | |
* Description: A WordPress plugin to add a menu option that redirects to your Desk.com Support Site. | |
* Version: 1.0.0 | |
* Author: Thomas Stachl | |
* Author URI: https://github.com/tstachl | |
* License: BSD 3-Clause License | |
*/ |
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
<div id="case_salesforce_section"> | |
{{widget.salesforce.body}} | |
</div> |
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
module ZendeskAPI::Middleware::Request::RetryExtension | |
def call(env) | |
super | |
rescue Errno::ETIMEDOUT, Timout::Error, Net::HTTPBadGateway => err | |
retry | |
end | |
end | |
class ZendeskAPI::Middleware::Request::Retry | |
prepend ZendeskAPI::Middleware::Request::RetryExtension |
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
<div class="agent_company_section"> | |
<span class="agent_company_section_label">{{ LABEL }}</span> | |
<div class="agent_company_section_data field_company_name"> | |
<input class="default customer_record_input_field" type="text" value="{{ company.custom_KEY }}" disabled> | |
</div> | |
</div> |
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
{% if article.number_of_attachments > 0 %} | |
<div id='attachments'> | |
<strong>{{system.snippets.attachments}}</strong> | |
<ul> | |
{% for attachment in article.kb_article_attachments %} | |
<li> | |
<a href="{{ attachment.faq_download_url }}" class="kb_article_attachment_a" target="_blank">{{ attachment.name }}</a> | |
</li> | |
{% endfor %} | |
</ul> |
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
$ openssl s_client -connect desk.com:443 | |
CONNECTED(00000003) | |
depth=1 /C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA | |
verify error:num=20:unable to get local issuer certificate | |
verify return:0 | |
--- | |
Certificate chain | |
0 s:/C=US/ST=California/L=San Francisco/O=Salesforce.com, Inc./CN=*.desk.com | |
i:/C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA | |
1 s:/C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA |
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
use strict; | |
use warnings; | |
use Net::OAuth 0.20; | |
use Data::Random qw(:all); | |
$Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0A; | |
use HTTP::Request::Common; | |
use LWP::UserAgent; | |
my $ua = LWP::UserAgent->new; |
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
require 'desk_api' # @see https://github.com/forcedotcom/salesforce-deskcom-api | |
# authenticate `DeskApi` with your Desk.com instance | |
##### | |
# FIND OR CREATE CUSTOMER | |
##### | |
# you should get the customer data from your system | |
customer_data = { | |
first_name: 'John', | |
last_name: 'Smith', |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Update Draft</title> | |
<meta name="description" content="A Desk.com canvas app example that updates a draft."> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | |
<script src="//ajax.deskapi.com/libs/desk/canvas/1.0.0/desk-canvas-all.js"></script> | |
<script> |
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
// Use: | |
// Desk client = new Desk('[email protected]', '$upp0rt!', 'https://example.desk.com'); | |
// JSONObject[] customers = client.getAllCustomers(); | |
class Desk { | |
public Desk(String username, String password, String endpoint) { | |
this.username = username; | |
this.password = password; | |
this.endpoint = endpoint; |