Sha256: 2126f34ceaec8b8d5489db5b8f8d8b711448ff72cd80fc3ff0cfdc212ef81f0c
Contents?: true
Size: 1.13 KB
Versions: 9
Compression:
Stored size: 1.13 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" # Cancels a top-up. Only pending top-ups can be canceled. 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 # Cancels a top-up. Only pending top-ups can be canceled. 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
9 entries across 9 versions & 1 rubygems