Module: GoogleAdsSavon::Model

Defined in:
lib/ads_savon/model.rb

Overview

GoogleAdsSavon::Model

Model for SOAP service oriented applications.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



8
9
10
# File 'lib/ads_savon/model.rb', line 8

def self.extended(base)
  base.setup
end

Instance Method Details

#actions(*actions) ⇒ Object

Accepts one or more SOAP actions and generates both class and instance methods named after the given actions. Each generated method accepts an optional SOAP body Hash and a block to be passed to GoogleAdsSavon::Client#request and executes a SOAP request.



20
21
22
23
24
25
# File 'lib/ads_savon/model.rb', line 20

def actions(*actions)
  actions.each do |action|
    define_class_action(action)
    define_instance_action(action)
  end
end

#setupObject



12
13
14
15
# File 'lib/ads_savon/model.rb', line 12

def setup
  class_action_module
  instance_action_module
end