Class: Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit

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

Defined Under Namespace

Modules: Interval Classes: MerchantCategoryCode

Instance Attribute Summary collapse

Class Method 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

#initialize(interval:, merchant_category_codes:, settlement_amount:) ⇒ Object

Parameters:



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
# File 'lib/increase/models/card.rb', line 438

class SpendingLimit < Increase::Internal::Type::BaseModel
  # @!attribute interval
  #   The interval at which the spending limit is enforced.
  #
  #   @return [Symbol, Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::Interval]
  required :interval,
           enum: -> { Increase::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::Interval }

  # @!attribute merchant_category_codes
  #   The Merchant Category Codes (MCCs) this spending limit applies to. If not set,
  #   the limit applies to all transactions.
  #
  #   @return [Array<Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::MerchantCategoryCode>, nil]
  required :merchant_category_codes,
           -> {
             Increase::Internal::Type::ArrayOf[Increase::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::MerchantCategoryCode]
           },
           nil?: true

  # @!attribute settlement_amount
  #   The maximum settlement amount permitted in the given interval.
  #
  #   @return [Integer]
  required :settlement_amount, Integer

  # @!method initialize(interval:, merchant_category_codes:, settlement_amount:)
  #   @param interval [Symbol, Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::Interval]
  #     The interval at which the spending limit is enforced.
  #
  #   @param merchant_category_codes [Array<Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::MerchantCategoryCode>, nil]
  #     The Merchant Category Codes (MCCs) this spending limit applies to. If not set,
  #     the limit applies to all transactions.
  #
  #   @param settlement_amount [Integer] The maximum settlement amount permitted in the given interval.

  # The interval at which the spending limit is enforced.
  #
  # @see Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit#interval
  module Interval
    extend Increase::Internal::Type::Enum

    # The spending limit applies over the lifetime of the card.
    ALL_TIME = :all_time

    # The spending limit applies per transaction.
    PER_TRANSACTION = :per_transaction

    # The spending limit applies per day. Resets nightly at midnight UTC.
    PER_DAY = :per_day

    # The spending limit applies per week. Resets weekly on Mondays at midnight UTC.
    PER_WEEK = :per_week

    # The spending limit applies per month. Resets on the first of the month, midnight UTC.
    PER_MONTH = :per_month

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  class MerchantCategoryCode < Increase::Internal::Type::BaseModel
    # @!attribute code
    #   The Merchant Category Code (MCC).
    #
    #   @return [String]
    required :code, String

    # @!method initialize(code:)
    #   @param code [String] The Merchant Category Code (MCC).
  end
end

Instance Attribute Details

#intervalSymbol, Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::Interval

The interval at which the spending limit is enforced.

Parameters:

  • value (Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::interval)

Returns:



443
444
# File 'lib/increase/models/card.rb', line 443

required :interval,
enum: -> { Increase::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::Interval }

#merchant_category_codesArray<Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::MerchantCategoryCode>?

The Merchant Category Codes (MCCs) this spending limit applies to. If not set, the limit applies to all transactions.

Parameters:

  • value (::Array[Increase::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::MerchantCategoryCode], nil)

Returns:



451
452
453
454
455
# File 'lib/increase/models/card.rb', line 451

required :merchant_category_codes,
-> {
  Increase::Internal::Type::ArrayOf[Increase::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit::MerchantCategoryCode]
},
nil?: true

#settlement_amountInteger

The maximum settlement amount permitted in the given interval.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


461
# File 'lib/increase/models/card.rb', line 461

required :settlement_amount, Integer

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/increase/models/card.rb', line 494

Instance Method Details

#to_hash{

Returns:

  • ({)


322
# File 'sig/increase/models/card.rbs', line 322

def to_hash: -> {