Class: Orb::Models::Invoice::AutoCollection

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/invoice.rb

Overview

See Also:

Instance Attribute Summary collapse

Method Summary

Methods inherited from Internal::Type::BaseModel

#==, ==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

This class inherits a constructor from Orb::Internal::Type::BaseModel

Instance Attribute Details

#enabledBoolean?

True only if auto-collection is enabled for this invoice.

Returns:

  • (Boolean, nil)


505
# File 'lib/orb/models/invoice.rb', line 505

required :enabled, Orb::Internal::Type::Boolean, nil?: true

#next_attempt_atTime?

If the invoice is scheduled for auto-collection, this field will reflect when the next attempt will occur. If dunning has been exhausted, or auto-collection is not enabled for this invoice, this field will be ‘null`.

Returns:

  • (Time, nil)


513
# File 'lib/orb/models/invoice.rb', line 513

required :next_attempt_at, Time, nil?: true

#num_attemptsInteger?

Number of auto-collection payment attempts.

Returns:

  • (Integer, nil)


519
# File 'lib/orb/models/invoice.rb', line 519

required :num_attempts, Integer, nil?: true

#previously_attempted_atTime?

If Orb has ever attempted payment auto-collection for this invoice, this field will reflect when that attempt occurred. In conjunction with ‘next_attempt_at`, this can be used to tell whether the invoice is currently in dunning (that is, `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or if dunning has been exhausted (`previously_attempted_at` is non-null, but `next_attempt_time` is null).

Returns:

  • (Time, nil)


530
# File 'lib/orb/models/invoice.rb', line 530

required :previously_attempted_at, Time, nil?: true