Sha256: d97d96bf599a264961e152255735e60cc65b5412404a652e760647562010220c

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  # Reviews can be used to supplement automated fraud detection with human expertise.
  #
  # Learn more about [Radar](https://stripe.com/radar) and reviewing payments
  # [here](https://stripe.com/docs/radar/reviews).
  class Review < APIResource
    extend Stripe::APIOperations::List

    OBJECT_NAME = "review"

    # Approves a Review object, closing it and removing it from the list of reviews.
    def approve(params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/reviews/%<review>s/approve", { review: CGI.escape(self["id"]) }),
        params: params,
        opts: opts
      )
    end

    # Approves a Review object, closing it and removing it from the list of reviews.
    def self.approve(review, params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/reviews/%<review>s/approve", { review: CGI.escape(review) }),
        params: params,
        opts: opts
      )
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
stripe-10.7.1 lib/stripe/resources/review.rb
stripe-10.8.0.pre.beta.1 lib/stripe/resources/review.rb
stripe-10.7.0 lib/stripe/resources/review.rb
stripe-10.7.0.pre.beta.3 lib/stripe/resources/review.rb
stripe-10.7.0.pre.beta.2 lib/stripe/resources/review.rb
stripe-10.7.0.pre.beta.1 lib/stripe/resources/review.rb
stripe-10.6.0 lib/stripe/resources/review.rb
stripe-10.6.0.pre.beta.1 lib/stripe/resources/review.rb
stripe-10.5.0 lib/stripe/resources/review.rb