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.572 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.571 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.570 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.569 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.568 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.567 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.566 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.565 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.564 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.563 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.562 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.561 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.560 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.559 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.558 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.557 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.556 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.555 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.554 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.553 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb