Sha256: fa892a01ad9375f5a90b945a72f7ebcca31cdcd4f2aeec81e6f09db7f30370e7

Contents?: true

Size: 352 Bytes

Versions: 7

Compression:

Stored size: 352 Bytes

Contents

class CampaignMonitor
  # Encapsulates the response received from the CampaignMonitor webservice.
  class Result
    attr_reader :message, :code

    def initialize(response)
      @message = response["Message"]
      @code = response["Code"].to_i
    end

    def succeeded?
      code == 0
    end

    def failed?
      !succeeded?
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
Empact-campaign_monitor-0.1.1 lib/campaign_monitor/result.rb
patientslikeme-campaign_monitor-1.1 lib/campaign_monitor/result.rb
patientslikeme-campaign_monitor-1.2.1 lib/campaign_monitor/result.rb
patientslikeme-campaign_monitor-1.2.2 lib/campaign_monitor/result.rb
patientslikeme-campaign_monitor-1.2 lib/campaign_monitor/result.rb
patientslikeme-campaign_monitor-1.3.0 lib/campaign_monitor/result.rb
turingstudio-campaign_monitor-1.3.1 lib/campaign_monitor/result.rb