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-13.3.0.pre.beta.1 lib/stripe/resources/cash_balance.rb
stripe-13.2.0 lib/stripe/resources/cash_balance.rb
stripe-13.1.2 lib/stripe/resources/cash_balance.rb
stripe-13.2.0.pre.beta.3 lib/stripe/resources/cash_balance.rb
stripe-13.2.0.pre.beta.2 lib/stripe/resources/cash_balance.rb
stripe-13.1.1 lib/stripe/resources/cash_balance.rb
stripe-13.2.0.pre.beta.1 lib/stripe/resources/cash_balance.rb
stripe-13.1.0 lib/stripe/resources/cash_balance.rb
stripe-13.0.2 lib/stripe/resources/cash_balance.rb
stripe-13.1.0.pre.beta.3 lib/stripe/resources/cash_balance.rb
stripe-13.0.1 lib/stripe/resources/cash_balance.rb
stripe-13.1.0.pre.beta.2 lib/stripe/resources/cash_balance.rb
stripe-13.0.0 lib/stripe/resources/cash_balance.rb
stripe-12.7.0.pre.beta.2 lib/stripe/resources/cash_balance.rb
stripe-12.7.0.pre.beta.1 lib/stripe/resources/cash_balance.rb
stripe-12.6.0 lib/stripe/resources/cash_balance.rb
stripe-12.6.0.pre.beta.1 lib/stripe/resources/cash_balance.rb
stripe-12.5.0 lib/stripe/resources/cash_balance.rb
stripe-12.5.0.pre.beta.2 lib/stripe/resources/cash_balance.rb
stripe-12.5.0.pre.beta.1 lib/stripe/resources/cash_balance.rb