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.632 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.631 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.630 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.629 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.628 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.627 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.626 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.625 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.624 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.623 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.622 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.621 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.620 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.619 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.618 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.617 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.616 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.615 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.614 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.613 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb