Sha256: 195c353fa7fb51970ba5ca0f8059015f2d3c47e88d6067e158784ef4f14e6fc1

Contents?: true

Size: 1.01 KB

Versions: 33

Compression:

Stored size: 1.01 KB

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  # To top up your Stripe balance, you create a top-up object. You can retrieve
  # individual top-ups, as well as list all top-ups. Top-ups are identified by a
  # unique, random ID.
  #
  # Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups)
  class Topup < APIResource
    extend Stripe::APIOperations::Create
    extend Stripe::APIOperations::List
    include Stripe::APIOperations::Save

    OBJECT_NAME = "topup"

    def cancel(params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/topups/%<topup>s/cancel", { topup: CGI.escape(self["id"]) }),
        params: params,
        opts: opts
      )
    end

    def self.cancel(topup, params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/topups/%<topup>s/cancel", { topup: CGI.escape(topup) }),
        params: params,
        opts: opts
      )
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
stripe-10.5.0.pre.beta.1 lib/stripe/resources/topup.rb
stripe-10.4.0 lib/stripe/resources/topup.rb
stripe-10.4.0.pre.beta.1 lib/stripe/resources/topup.rb
stripe-10.3.0 lib/stripe/resources/topup.rb
stripe-10.3.0.pre.beta.1 lib/stripe/resources/topup.rb
stripe-10.2.0 lib/stripe/resources/topup.rb
stripe-10.2.0.pre.beta.1 lib/stripe/resources/topup.rb
stripe-10.1.0 lib/stripe/resources/topup.rb
stripe-10.1.0.pre.beta.2 lib/stripe/resources/topup.rb
stripe-10.1.0.pre.beta.1 lib/stripe/resources/topup.rb
stripe-10.0.0 lib/stripe/resources/topup.rb
stripe-9.5.0.pre.beta.2 lib/stripe/resources/topup.rb
stripe-9.5.0.pre.beta.1 lib/stripe/resources/topup.rb
stripe-9.4.0 lib/stripe/resources/topup.rb
stripe-9.4.0.pre.beta.3 lib/stripe/resources/topup.rb
stripe-9.4.0.pre.beta.2 lib/stripe/resources/topup.rb
stripe-9.4.0.pre.beta.1 lib/stripe/resources/topup.rb
stripe-9.3.0 lib/stripe/resources/topup.rb
stripe-9.3.0.pre.beta.1 lib/stripe/resources/topup.rb
stripe-9.2.0 lib/stripe/resources/topup.rb