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

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/increase/models/card_update_params.rb,
sig/increase/models/card_update_params.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:, settlement_amount:, merchant_category_codes: nil) ⇒ Object

Parameters:



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
# File 'lib/increase/models/card_update_params.rb', line 353

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

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

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

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

  # The interval at which the spending limit is enforced.
  #
  # @see Increase::Models::CardUpdateParams::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.
    #
    #   @return [String]
    required :code, String

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

Instance Attribute Details

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

The interval at which the spending limit is enforced.

Parameters:

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

Returns:



358
359
# File 'lib/increase/models/card_update_params.rb', line 358

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

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

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



372
373
# File 'lib/increase/models/card_update_params.rb', line 372

optional :merchant_category_codes,
-> { Increase::Internal::Type::ArrayOf[Increase::CardUpdateParams::AuthorizationControls::Usage::MultiUse::SpendingLimit::MerchantCategoryCode] }

#settlement_amountInteger

The maximum settlement amount permitted in the given interval.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


365
# File 'lib/increase/models/card_update_params.rb', line 365

required :settlement_amount, Integer

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/increase/models/card_update_params.rb', line 406

Instance Method Details

#to_hash{

Returns:

  • ({)


364
# File 'sig/increase/models/card_update_params.rbs', line 364

def to_hash: -> {