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

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

Overview

See Also:

  • Orb::Models::Invoice#auto_collection

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, 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

#initializeObject



236
# File 'sig/orb/models/invoice.rbs', line 236

def initialize: (

Instance Attribute Details

#enabledBoolean?

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

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


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

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.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

required :next_attempt_at, Time, nil?: true

#num_attemptsInteger?

Number of auto-collection payment attempts.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

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).

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

required :previously_attempted_at, Time, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


243
# File 'sig/orb/models/invoice.rbs', line 243

def to_hash: -> {