Sha256: 119905b7df8e895a5e9e1d989289443eeee6a471c58108d8129e141debec6f6d

Contents?: true

Size: 616 Bytes

Versions: 10

Compression:

Stored size: 616 Bytes

Contents

module NIFTY
  class Response
    # ニフティクラウドAPIのレスポンス解析クラス
    #
    #  @option options [String] :xml           解析対象のXML
    #  @option options [Hash] :parse_options   xml-simpleの解析オプション
    #  @return [Hash] レスポンスXML解析結果
    #
    def self.parse(options = {})
      options = {
        :xml => "",
        :parse_options => { 'forcearray' => ['item', 'member'], 'suppressempty' => nil, 'keeproot' => false }
      }.merge(options)

      return response = XmlSimple.xml_in(options[:xml], options[:parse_options])
    end
  end
end 

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
nifty-cloud-sdk-1.11.beta7 lib/NIFTY/responses.rb
nifty-cloud-sdk-1.11.beta6 lib/NIFTY/responses.rb
nifty-cloud-sdk-1.11.beta5 lib/NIFTY/responses.rb
nifty-cloud-sdk-1.11.beta4 lib/NIFTY/responses.rb
nifty-cloud-sdk-1.11.beta3 lib/NIFTY/responses.rb
nifty-cloud-sdk-1.11.beta2 lib/NIFTY/responses.rb
nifty-cloud-sdk-1.11.beta1 lib/NIFTY/responses.rb
nifty-cloud-sdk-1.9.beta1 lib/NIFTY/responses.rb
nifty-cloud-sdk-1.8.beta1 lib/NIFTY/responses.rb
nifty-cloud-sdk-1.7 lib/NIFTY/responses.rb