Class: Google::Apis::RequestOptions

Inherits:
Struct
  • Object
show all
Defined in:
lib/google/apis/options.rb,
lib/google/apis/options.rb

Overview

Request options

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorizationSignet::OAuth2::Client, #apply(Hash)


49
50
51
# File 'lib/google/apis/options.rb', line 49

def authorization
  @authorization
end

#headerHash<String,String] Additional HTTP headers to include in requests


49
50
51
# File 'lib/google/apis/options.rb', line 49

def header
  @header
end

#open_timeout_secFixnum


49
50
51
# File 'lib/google/apis/options.rb', line 49

def open_timeout_sec
  @open_timeout_sec
end

#retriesFixnum


49
50
51
# File 'lib/google/apis/options.rb', line 49

def retries
  @retries
end

#timeout_secFixnum


49
50
51
# File 'lib/google/apis/options.rb', line 49

def timeout_sec
  @timeout_sec
end

Class Method Details

.defaultGoogle::Apis::RequestOptions

Get the default options


62
63
64
# File 'lib/google/apis/options.rb', line 62

def self.default
  @options ||= RequestOptions.new
end

Instance Method Details

#merge(options) ⇒ Object


66
67
68
69
70
71
72
73
74
75
# File 'lib/google/apis/options.rb', line 66

def merge(options)
  return self if options.nil?

  new_options = dup
  members.each do |opt|
    opt = opt.to_sym
    new_options[opt] = options[opt] unless options[opt].nil?
  end
  new_options
end