Sha256: 5b9037d315d0e44260bd1968ca231fff927efa966fb0dc30729179b0fb13f420

Contents?: true

Size: 698 Bytes

Versions: 5

Compression:

Stored size: 698 Bytes

Contents

# frozen_string_literal: true

module Stripe
  module Issuing
    class Authorization < Stripe::APIResource
      extend Stripe::APIOperations::List
      include Stripe::APIOperations::Save

      OBJECT_NAME = "issuing.authorization".freeze

      custom_method :approve, http_verb: :post
      custom_method :decline, http_verb: :post

      def approve(params = {}, opts = {})
        resp, opts = request(:post, resource_url + "/approve", params, opts)
        initialize_from(resp.data, opts)
      end

      def decline(params = {}, opts = {})
        resp, opts = request(:post, resource_url + "/decline", params, opts)
        initialize_from(resp.data, opts)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stripe-4.16.0 lib/stripe/issuing/authorization.rb
stripe-4.15.0 lib/stripe/issuing/authorization.rb
stripe-4.14.0 lib/stripe/issuing/authorization.rb
stripe-4.13.0 lib/stripe/issuing/authorization.rb
stripe-4.12.0 lib/stripe/issuing/authorization.rb