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

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

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

Some parameter documentations has been truncated, see Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit for more details.

Parameters:



412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
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
# File 'lib/increase/models/card.rb', line 412

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:)
  #   Some parameter documentations has been truncated, see
  #   {Increase::Models::Card::AuthorizationControls::Usage::MultiUse::SpendingLimit}
  #   for more details.
  #
  #   @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, t
  #
  #   @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.



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

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.



425
426
427
428
429
# File 'lib/increase/models/card.rb', line 425

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.

Returns:

  • (Integer)


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

required :settlement_amount, Integer

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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