From a9b57c91731c7a31f194a3ab7c09ef45d7def4fd Mon Sep 17 00:00:00 2001 From: phiggins Date: Thu, 3 Feb 2011 17:09:04 -0800 Subject: [PATCH] SNS SetTopicAttributes --- .../aws/parsers/sns/set_topic_attributes.rb | 24 +++++++++++++++++ .../aws/requests/sns/set_topic_attributes.rb | 26 +++++++++++++++++++ lib/fog/aws/sns.rb | 1 + 3 files changed, 51 insertions(+) create mode 100644 lib/fog/aws/parsers/sns/set_topic_attributes.rb create mode 100644 lib/fog/aws/requests/sns/set_topic_attributes.rb diff --git a/lib/fog/aws/parsers/sns/set_topic_attributes.rb b/lib/fog/aws/parsers/sns/set_topic_attributes.rb new file mode 100644 index 000000000..19639b7fe --- /dev/null +++ b/lib/fog/aws/parsers/sns/set_topic_attributes.rb @@ -0,0 +1,24 @@ +module Fog + module Parsers + module AWS + module SNS + + class SetTopicAttributes < Fog::Parsers::Base + + def reset + @response = {} + end + + def end_element(name) + case name + when 'RequestId' + @response[name] = @value + end + end + + end + + end + end + end +end diff --git a/lib/fog/aws/requests/sns/set_topic_attributes.rb b/lib/fog/aws/requests/sns/set_topic_attributes.rb new file mode 100644 index 000000000..404ba3f64 --- /dev/null +++ b/lib/fog/aws/requests/sns/set_topic_attributes.rb @@ -0,0 +1,26 @@ +module Fog + module AWS + class SNS + class Real + + require 'fog/aws/parsers/sns/set_topic_attributes' + + def set_topic_attributes(options = {}) + request({ + 'Action' => 'SetTopicAttributes', + :parser => Fog::Parsers::AWS::SNS::SetTopicAttributes.new + }.merge!(options)) + end + + end + + class Mock + + def set_topic_attributes(options = {}) + Fog::Mock.not_implemented + end + + end + end + end +end diff --git a/lib/fog/aws/sns.rb b/lib/fog/aws/sns.rb index 992d8d8ea..66b06f8fd 100644 --- a/lib/fog/aws/sns.rb +++ b/lib/fog/aws/sns.rb @@ -15,6 +15,7 @@ module Fog request :list_topics request :publish request :remove_permission + request :set_topic_attributes class Mock