Sha256: 73a0d5d2434ff6ea0229be964ee619b8122b7d9d1e01c2ea28b83a5bcc5ca6c1

Contents?: true

Size: 856 Bytes

Versions: 2

Compression:

Stored size: 856 Bytes

Contents

# coding: utf-8

module Fog
  module DNS
    class SakuraCloud
      class Real
        def modify_zone(options)
          body = {
            "CommonServiceItem"=>{
              "Settings" => options[:settings]
            }
          }

          request(
            :headers => {
              'Authorization' => "Basic #{@auth_encode}"
            },
            :expects  => 200,
            :method => 'PUT',
            :path => "#{Fog::SakuraCloud::SAKURACLOUD_API_ENDPOINT}/commonserviceitem/#{options[:id]}",
            :body => Fog::JSON.encode(body)
          )
        end
      end # Real

      class Mock
        def modify_zone(options)
          response = Excon::Response.new
          response.status = 200
          response.body = {
          }
          response
        end
      end
    end # SakuraCloud
  end # DNS
end # Fog

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-sakuracloud-1.4.0 lib/fog/sakuracloud/requests/dns/modify_zone.rb
fog-sakuracloud-1.3.3 lib/fog/sakuracloud/requests/dns/modify_zone.rb