Sha256: 058422521ef5c280b3599585d5b7f0b69600adffe0641f0770bf3e8e2ce85e67
Contents?: true
Size: 870 Bytes
Versions: 2
Compression:
Stored size: 870 Bytes
Contents
module ActiveCampaignCrm class Client module Organization def organizations(params = {}) response = @connection.get('organizations', params) response['organizations'] end def organization(id) response = @connection.get("organizations/#{id}") response['organization'] end def create_organization(fields) response = @connection.post('organizations', organization_body(fields)) response['organization'] end def update_organization(id, fields) response = @connection.put("organizations/#{id}", organization_body(fields)) response['organization'] end def delete_organization(id) @connection.delete("organizations/#{id}") end def organization_body(fields) { 'organization': fields }.to_json end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_campaign_crm-0.1.2 | lib/active_campaign_crm/client/organizations.rb |
active_campaign_crm-0.1.1 | lib/active_campaign_crm/client/organizations.rb |