Sha256: afdeedaf04259cfae04d977a0bb779991485c9e1c51badf60dcb2e64c883241e

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 KB

Contents

module PurposePlatformQueuedClient
  class Action < Base
    # guard: Bot prevention! You must pass a blank string for this field
    # hp_enabled: Bot prevention! You must pass a checked checkbox for this field. Note the checkbox should be hidden from the user.
    # hp_disabled: Bot prevention! You must not pass this field, or pass an unchecked checkbox, which should be hidden from the user.
    # member[first_name]: (String) The first name (or full name) of the user. Since many forms don't collect last name as a separate field, you can put the whole thing in this one.
    # member[last_name]: (String) Last name of user
    # member[email]: (String) Email address
    # member[street_address]: (String) Street address of user
    # member[postcode]: (String) Zip / Post code of user
    # member[country]: (String, limit 2 characters) Two character ISO code for country.
    # tag: (String) The slug name (eg. "save-the-whales') for the campaign.
    # org: (String) MUST BE "fftf"

    def default_params
      {
        guard: '',
        hp_enabled: 'true'
      }
    end

    def base_path
      'action'
    end

    def create(params)
      params = params.merge(default_params)
      super(params)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
purpose-platform-queued-client-0.1.1 lib/purpose-platform-queued-client/action.rb
purpose-platform-queued-client-0.0.3 lib/purpose-platform-queued-client/action.rb