Sha256: 6dd4a42b029b647e07c929ebe25a23685687a1f99289b754ba7ad3a68841d8a0

Contents?: true

Size: 968 Bytes

Versions: 49

Compression:

Stored size: 968 Bytes

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  # A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
  class CashBalance < APIResource
    OBJECT_NAME = "cash_balance"
    def self.object_name
      "cash_balance"
    end

    def resource_url
      if !respond_to?(:customer) || customer.nil?
        raise NotImplementedError,
              "Customer Cash Balance cannot be accessed without a customer ID."
      end
      "#{Customer.resource_url}/#{CGI.escape(customer)}/cash_balance"
    end

    def self.retrieve(_id, _opts = {})
      raise NotImplementedError,
            "Customer Cash Balance cannot be retrieved without a customer ID. " \
            "Retrieve a Customer Cash Balance using `Customer.retrieve_cash_balance('cus_123')`"
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
stripe-10.13.0 lib/stripe/resources/cash_balance.rb
stripe-10.13.0.pre.beta.1 lib/stripe/resources/cash_balance.rb
stripe-10.12.0 lib/stripe/resources/cash_balance.rb
stripe-10.12.0.pre.beta.1 lib/stripe/resources/cash_balance.rb
stripe-10.11.0 lib/stripe/resources/cash_balance.rb
stripe-10.11.0.pre.beta.1 lib/stripe/resources/cash_balance.rb
stripe-10.10.0 lib/stripe/resources/cash_balance.rb
stripe-10.10.0.pre.beta.1 lib/stripe/resources/cash_balance.rb
stripe-10.9.0 lib/stripe/resources/cash_balance.rb