Sha256: 9b5e28bffd391d5a30da5a25c28e921e0f7b0110833421f5ce2b07cc5b3f6397

Contents?: true

Size: 740 Bytes

Versions: 1038

Compression:

Stored size: 740 Bytes

Contents

module Aws
  module Stubbing
    module Protocols
      class RestXml < Rest

        include Seahorse::Model::Shapes

        def body_for(api, operation, rules, data)
          xml = []
          rules.location_name = operation.name + 'Result'
          rules['xmlNamespace'] = { 'uri' => api.metadata['xmlNamespace'] }
          Xml::Builder.new(rules, target:xml).to_xml(data)
          xml.join
        end

        def stub_error(error_code)
          http_resp = Seahorse::Client::Http::Response.new
          http_resp.status_code = 400
          http_resp.body = XmlError.new(error_code).to_xml
          http_resp
        end

        def xmlns(api)
          api.metadata['xmlNamespace']
        end

      end
    end
  end
end

Version data entries

1,038 entries across 1,038 versions & 2 rubygems

Version Path
aws-sdk-core-2.11.612 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.611 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.610 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.609 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.608 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.607 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.606 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.605 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.604 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.603 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.602 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.601 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.600 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.599 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.598 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.597 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.596 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.595 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.594 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.593 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb