Sha256: 6b74f691dc7eef9ddc0162725dd677c2be8f93b90360287907df685968878b0f

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

module Eligible
  module V1_0
    class FeeRefund < RestAPIBase
      ENDPOINT_NAME = 'fee_refunds'.freeze

      def self.retrieve(params, opts = {})
        send_request :get, "#{fee_url(params)}/fee_refunds/#{fee_refund_id(params)}", rest_api_params(params), **opts.merge(required_params: [:id, :fee])
      end

      def self.create(params, opts = {})
        send_request :post, "#{fee_url(params)}/fee_refunds", rest_api_params(params), **opts.merge(required_params: [:fee])
      end

      def self.update(params, opts = {})
        send_request :put, "#{fee_url(params)}/fee_refunds/#{fee_refund_id(params)}", rest_api_params(params), **opts.merge(required_params: [:id, :fee])
      end

      def self.list(params, opts = {})
        send_request :get, "#{fee_url(params)}/fee_refunds", rest_api_params(params), **opts.merge(required_params: [:fee])
      end

      def self.delete(_params, _opts = {})
        fail NotImplementedError, "Not an allowed operation for this endpoint"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eligible-3.1.0.beta3 lib/eligible/v1_0/fee_refund.rb
eligible-3.1.0.beta2 lib/eligible/v1_0/fee_refund.rb
eligible-3.1.0.beta1 lib/eligible/v1_0/fee_refund.rb