Skip to content

Instantly share code, notes, and snippets.

View kevprice83's full-sized avatar

Kevin kevprice83

  • Red Hat
  • Barcelona
View GitHub Profile
@kevprice83
kevprice83 / adyen.html.liquid
Last active May 5, 2016 18:03
Adyen Payment Gateway
{% when "adyen12" %}
{% if current_account.has_billing_address? %}
{% adyen12_form %}
{% else %}
<p><a href="{{ current_account.edit_adyen12_billing_address_url }}">First add a billing address</a></p>
{% endif %}
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Swagger API Team",
"email": "[email protected]",
curl -X GET "http:example.com/api/pets?tags=TAGS&limit=LIMIT" -H "user_key: {user_key}"
curl -X POST "http:example.com/api/pets" -H "user_key: {user_key}" -d "{ "name": "NAME", "tag": "TAG", "id": ID }"
curl -X GET "http:example.com/api/pets/{id}" -H "user_key: {user_key}"
curl -X DELETE "http:example.com/api/pets/{id}" -H "user_key: {user_key}"
"parameters": [
{
"name": "user_key",
"description": "Your access API Key",
"type": "string",
"in": "query",
"x-data-threescale-name": "user_keys",
// or "x-data-threescale-name": "app_ids" for authentication model App Id or OAuth
// and "x-data-threescale-name": "app_keys" for authentication mode APP Id
"required": true
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "apigateway.amazonaws.com"
},
"Action": "sts:AssumeRole"
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Hello World API",
"description": "A simple Hello World API ",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Nicolas Grenié; [email protected]"
},
"x-amazon-apigateway-auth": {
"type": "none"
},
"x-amazon-apigateway-integration": {
"type": "AWS",
"uri": "arn:aws:apigateway:REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:REGION:ACCT_ID:function:FUNCTION_NAME/invocations",
"credentials": "arn:aws:iam::ACCT_ID:role/lambda_gateway_execution",
"httpMethod": "POST",
"requestTemplates": {
"application/json": "{\"user_key\":\"$input.params('user_key')\",\"resourcePath\": \"$context.resourcePath\",\"httpMethod\": \"$context.httpMethod\",\"body\": $input.json('$')}"
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1440787840000",
"Effect": "Allow",
"Action": [
"lambda:InvokeFunction"
],
"Resource": [
"parameters": [
{
"name": "user_key",
"in": "query",
"description": "API key",
"type":"string"
}
],