class Stripe::Topup

Related guide: [Topping up your platform account](stripe.com/docs/connect/top-ups)
unique, random ID.
individual top-ups, as well as list all top-ups. Top-ups are identified by a
To top up your Stripe balance, you create a top-up object. You can retrieve

def self.cancel(topup, params = {}, opts = {})

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

def self.create(params = {}, opts = {})

Top up the balance of an account
def self.create(params = {}, opts = {})
  request_stripe_object(method: :post, path: "/v1/topups", params: params, opts: opts)
end

def self.list(filters = {}, opts = {})

Returns a list of top-ups.
def self.list(filters = {}, opts = {})
  request_stripe_object(method: :get, path: "/v1/topups", params: filters, opts: opts)
end

def self.object_name

def self.object_name
  "topup"
end

def self.update(id, params = {}, opts = {})

Updates the metadata of a top-up. Other top-up details are not editable by design.
def self.update(id, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/topups/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts
  )
end

def cancel(params = {}, opts = {})

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