Sha256: 57b75de47b2b9d5222e376b4739b23eb0938befdc78dd75563dfa7a9371d3d36
Contents?: true
Size: 897 Bytes
Versions: 1
Compression:
Stored size: 897 Bytes
Contents
# frozen_string_literal: true module Zuora module Calls class Upsert < Hashie::Dash # Base class for Create and Update # @params [Symbol] type e.g. :BillRun, :Refund # @params [Array] objects - collection of objects of type `type` property :type, required: true property :objects, required: true def call_name raise 'This class is abstract. Subclassers must def :call_name' end # Generates a function that takes a builder # adds call of call_name and z-object(s) ogit rf type # @return [Callable] - function of builder def xml_builder raise '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 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zuora-ruby-0.7.0 | lib/zuora/calls/upsert.rb |