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.552 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.551 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.550 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.549 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.548 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.547 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.546 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.545 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.544 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.543 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.542 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.541 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.540 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.539 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.538 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.537 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.536 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.535 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.534 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
aws-sdk-core-2.11.533 lib/aws-sdk-core/stubbing/protocols/rest_xml.rb