Sha256: d123b85dab670a4096076b5d543057f7084aa01f183c07277fff238c795d8c73

Contents?: true

Size: 534 Bytes

Versions: 36

Compression:

Stored size: 534 Bytes

Contents

# frozen_string_literal: true

module IronBank
  # Base class for Zuora operations, e.g., billing preview
  #
  class Operation
    private_class_method :new

    def self.call(args)
      new(args).call
    end

    def call
      IronBank.client.connection.post(endpoint, params).body
    end

    private

    attr_reader :args

    def initialize(args)
      @args = args
    end

    def endpoint
      "v1/operations/#{IronBank::Utils.kebab(name)}"
    end

    def name
      self.class.name.split("::").last
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

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