Class: Zuora::Calls::Upsert
- Inherits:
-
Hashie::Dash
- Object
- Hashie::Dash
- Zuora::Calls::Upsert
- Defined in:
- lib/zuora/calls/upsert.rb
Instance Method Summary collapse
- #call_name ⇒ Object
-
#xml_builder ⇒ Callable
Generates a function that takes a builder adds call of call_name and z-object(s) ogit rf type.
Instance Method Details
#call_name ⇒ Object
11 12 13 |
# File 'lib/zuora/calls/upsert.rb', line 11 def call_name fail 'This class is abstract. Subclassers must def :call_name' end |
#xml_builder ⇒ Callable
Generates a function that takes a builder adds call of call_name and z-object(s) ogit rf type
18 19 20 21 22 23 24 25 26 |
# File 'lib/zuora/calls/upsert.rb', line 18 def xml_builder fail 'objects must respond to :each' unless objects.respond_to?(:each) lambda do |builder| builder[:api].send(call_name) do Zuora::Utils::Envelope.build_objects builder, type, objects end end end |