Sha256: 4ec206f8b7e3679e9875858cc40dc4f1169afc7df4a276e813b6ea1852f640a2

Contents?: true

Size: 854 Bytes

Versions: 7

Compression:

Stored size: 854 Bytes

Contents

module Recurly
  # The AccountBalance object contains some information about the account's balance.
  # It exists to give us parity with the v1 API which used to include this information with
  # the {Account}. You can get an account's balance by calling {Account#account_balance} on an account instance.
  #
  # Recurly Documentation: https://dev.recurly.com/docs/lookup-account-balance
  class AccountBalance < Resource
    # @return [Account, nil]
    has_one :account, readonly: true

    define_attribute_methods %w(
      past_due
      balance_in_cents
      processing_prepayment_balance_in_cents
    )

    # This object does not represent a model on the server side
    # so we do not need to expose these methods.
    protected(*%w(save save!))
    private_class_method(*%w(all find_each first paginate scoped where create! create))
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
recurly-2.18.30 lib/recurly/account_balance.rb
recurly-2.18.29 lib/recurly/account_balance.rb
recurly-2.18.28 lib/recurly/account_balance.rb
recurly-2.18.27 lib/recurly/account_balance.rb
recurly-2.18.26 lib/recurly/account_balance.rb
recurly-2.18.25 lib/recurly/account_balance.rb
recurly-2.18.24 lib/recurly/account_balance.rb