Sha256: 3e26a36c169c8b474f5d6cc030c4d505ae1f3e82469b7e45364d1ccb7b0e0433

Contents?: true

Size: 660 Bytes

Versions: 4

Compression:

Stored size: 660 Bytes

Contents

# frozen_string_literal: true

module ActionNetworkRest
  class Forms < Base
    def initialize(client:)
      super(client: client)
    end

    def base_path
      'forms/'
    end

    def create(form_data)
      post_data = form_data

      response = client.post_request(base_path, post_data)
      object_from_response(response, action_network_id_required: true)
    end

    def update(form_id, form_data)
      put_data = form_data

      response = client.put_request("#{base_path}#{form_id}", put_data)
      object_from_response(response, action_network_id_required: true)
    end

    private

    def osdi_key
      'osdi:forms'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
action_network_rest-0.12.0 lib/action_network_rest/forms.rb
action_network_rest-1.0.1 lib/action_network_rest/forms.rb
action_network_rest-1.0.0 lib/action_network_rest/forms.rb
action_network_rest-0.11.0 lib/action_network_rest/forms.rb