Sha256: fc3ad82c61575ff5026d1364bdcf35cb9bcc898a060e748a97db2f1d08bcf31c

Contents?: true

Size: 561 Bytes

Versions: 41

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

module IronBank
  module Actions
    # Create one or more objects of a specific type
    # https://www.zuora.com/developer/api-reference/#operation/Action_POSTcreate
    #
    class Create < Action
      private

      def params
        {
          objects: objects,
          type:    type
        }
      end

      def objects
        IronBank::Object.new(args.fetch(:objects)).deep_camelize(type: :upper)
      end

      def type
        IronBank::Utils.camelize(args.fetch(:type), type: :upper)
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
iron_bank-5.4.1 lib/iron_bank/actions/create.rb
iron_bank-5.4.0 lib/iron_bank/actions/create.rb
iron_bank-5.3.2 lib/iron_bank/actions/create.rb
iron_bank-5.3.0 lib/iron_bank/actions/create.rb
iron_bank-5.2.6 lib/iron_bank/actions/create.rb
iron_bank-5.2.4 lib/iron_bank/actions/create.rb
iron_bank-5.2.3 lib/iron_bank/actions/create.rb
iron_bank-5.2.0 lib/iron_bank/actions/create.rb
iron_bank-5.1.1 lib/iron_bank/actions/create.rb
iron_bank-5.1.0 lib/iron_bank/actions/create.rb
iron_bank-4.4.3 lib/iron_bank/actions/create.rb
iron_bank-5.0.1 lib/iron_bank/actions/create.rb
iron_bank-5.0.0 lib/iron_bank/actions/create.rb
iron_bank-4.4.1 lib/iron_bank/actions/create.rb
iron_bank-4.4.0 lib/iron_bank/actions/create.rb
iron_bank-4.3.1 lib/iron_bank/actions/create.rb
iron_bank-4.3.0 lib/iron_bank/actions/create.rb
iron_bank-4.2.0 lib/iron_bank/actions/create.rb
iron_bank-4.1.1 lib/iron_bank/actions/create.rb
iron_bank-4.1.0 lib/iron_bank/actions/create.rb