Skip to content

Instantly share code, notes, and snippets.

View Marthyn's full-sized avatar

Marthyn Olthof Marthyn

View GitHub Profile
@Marthyn
Marthyn / Gemfile.lock
Created January 27, 2016 09:29
Upgrade to Rails 4.2.5.1
GIT
remote: git://github.com/hoppinger/capistrano-puma.git
revision: ee6242600e249065e8fead7fc7440723fa18cd24
branch: feature/no_explicit_restart
specs:
capistrano3-puma (1.2.1)
capistrano (~> 3.0)
puma (>= 2.6)
GEM
@Marthyn
Marthyn / Gemfile.lock
Created January 27, 2016 09:32
VMN Gemfile.lock
GIT
remote: git://github.com/wponrails/wp-connector.git
revision: eb0505e634920810e8dfd3cc04b4068e291733a1
tag: v1.3.0
specs:
wp-connector (1.0.0)
faraday
json
rails (>= 4.0.0)
sidekiq (~> 2.17.7)

Kiesvoorjezorg Koppeling

How to use

When there's a new or updated Facility in Kiesvoorjezorg, they have to send a POST request to api.gastvrijezorg.nl/api/v1/triggers. In the parameters we expect a code, id of the resource and your source identifier ('kvz') for example. Code 10 is a new Facility, code 20 is an update.

CODES = {
 "10" => "New",
def contact_person_params
params.require(:contact_person).permit(:first_name, :middle_name, :last_name, :phone_number, :title, :initials, :job_description)
end
def account_params
params.require(:account).permit(:starting_company, :turnover, :company_name, :kvk_number, :btw_number, :phone,
:address_postalcode, :address_housenumber, :address_streetname, :address_city,
:invoice_email_address,
:invoice_address_postalcode, :invoice_address_housenumber,
:invoice_address_streetname, :invoice_address_city)
<% if optinmonster_id_hash %>
  <!-- OptinMonster --><div id="om-<%= optinmonster_id_hash %>-holder"></div><script>
  $(window).load(function () {
  var <%= optinmonster_id_hash %>,<%= optinmonster_id_hash %>_poll=function(){var r=0;return function(n,l){clearInterval(r),r=setInterval(n,l)}}();!function(e,t,n){if(e.getElementById(n)){<%= optinmonster_id_hash %>_poll(function(){if(window['om_loaded']){if(!<%= optinmonster_id_hash %>){<%= optinmonster_id_hash %>=new OptinMonsterApp();return <%= optinmonster_id_hash %>.init({u:"9819.<%= optinmonster_id_num %>",staging:0,dev:0});}}},25);return;}var d=false,o=e.createElement(t);o.id=n,o.src="//a.optinmonster.com/app/js/api.min.js",o.onload=o.onreadystatechange=function(){if(!d){if(!this.readyState||this.readyState==="loaded"||this.readyState==="complete"){try{d=om_loaded=true;<%= optinmonster_id_hash %>=new OptinMonsterApp();<%= optinmonster_id_hash %>.init({u:"9819.<%= optinmonster_id_num %>",staging:0,dev:0});o.onload=o.onreadystatechange=null;}catch(t){}}}};(doc
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:services="http://www.exactsoftware.com/services/entities/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:schemas="http://www.exactsoftware.com/schemas/entities/" xmlns:xmlschemainstance="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmlschema="http://www.w3.org/2001/XMLSchema" xmlns:serialization="http://schemas.microsoft.com/2003/10/Serialization/">
<env:Body>
<services:Save>
<services:data>
<schemas:AccountCode>
<schemas:Value> 1126852</schemas:Value>
<schemas:IsDirty>true</schemas:IsDirty>
<schemas:IsNothing>false</schemas:IsNothing>
</schemas:AccountCode>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<Save xmlns="http://www.exactsoftware.com/services/entities/">
<data xmlns:a="http://www.exactsoftware.com/schemas/entities/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Account>
=> {"services:data"=>
{"schemas:Account"=>{"schemas:IsDirty"=>true, "schemas:Value"=>"5516f317-8998-4761-88e3-8dab05c0ce13"},
"schemas:AddressCode"=>{"schemas:IsDirty"=>false, "schemas:Value"=>nil},
"schemas:AddressID"=>{"schemas:IsDirty"=>false, "schemas:Value"=>"00000000-0000-0000-0000-000000000000"},
"schemas:AddressLine1"=>{"schemas:IsDirty"=>true, "schemas:Value"=>"Nassaukade 5"},
"schemas:AddressLine2"=>{"schemas:IsDirty"=>true, "schemas:Value"=>"2e etage"},
"schemas:AddressLine3"=>{"schemas:IsDirty"=>true, "schemas:Value"=>"voorkant"},
"schemas:AmountFreeField1"=>{"schemas:IsDirty"=>false, "schemas:Value"=>"0"},
"schemas:AmountFreeField2"=>{"schemas:IsDirty"=>false, "schemas:Value"=>"0"},
"schemas:AmountFreeField3"=>{"schemas:IsDirty"=>false, "schemas:Value"=>"0"},
<?xml version="1.0" encoding="UTF-8"?>
<data>
<Account>
<IsDirty type="boolean">true</IsDirty>
<Value>5516f317-8998-4761-88e3-8dab05c0ce13</Value>
</Account>
<AddressCode>
<IsDirty type="boolean">false</IsDirty>
<Value nil="true"/>
</AddressCode>
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:services="http://www.exactsoftware.com/services/entities/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:schemas="http://www.exactsoftware.com/schemas/entities/" xmlns:xmlschemainstance="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmlschema="http://www.w3.org/2001/XMLSchema" xmlns:serialization="http://schemas.microsoft.com/2003/10/Serialization/">
<env:Body>
<services:Save>
<services:data>
<schemas:Account>
<schemas:IsDirty>true</schemas:IsDirty>
<schemas:Value>5516f317-8998-4761-88e3-8dab05c0ce13</schemas:Value>
</schemas:Account>
<schemas:AddressCode>