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

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

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

Parameters:



341
342
343
344
345
346
347
348
349
350
351
352
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
# File 'lib/increase/models/card_create_params.rb', line 341

class SpendingLimit < Increase::Internal::Type::BaseModel
  # @!attribute interval
  #   The interval at which the spending limit is enforced.
  #
  #   @return [Symbol, Increase::Models::CardCreateParams::AuthorizationControls::Usage::MultiUse::SpendingLimit::Interval]
  required :interval,
           enum: -> { Increase::CardCreateParams::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::CardCreateParams::AuthorizationControls::Usage::MultiUse::SpendingLimit::MerchantCategoryCode>, nil]
  optional :merchant_category_codes,
           -> { Increase::Internal::Type::ArrayOf[Increase::CardCreateParams::AuthorizationControls::Usage::MultiUse::SpendingLimit::MerchantCategoryCode] }

  # @!method initialize(interval:, settlement_amount:, merchant_category_codes: nil)
  #   Some parameter documentations has been truncated, see
  #   {Increase::Models::CardCreateParams::AuthorizationControls::Usage::MultiUse::SpendingLimit}
  #   for more details.
  #
  #   @param interval [Symbol, Increase::Models::CardCreateParams::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::CardCreateParams::AuthorizationControls::Usage::MultiUse::SpendingLimit::MerchantCategoryCode>] The Merchant Category Codes this spending limit applies to. If not set, the limi

  # The interval at which the spending limit is enforced.
  #
  # @see Increase::Models::CardCreateParams::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::CardCreateParams::AuthorizationControls::Usage::MultiUse::SpendingLimit::Interval

The interval at which the spending limit is enforced.



346
347
# File 'lib/increase/models/card_create_params.rb', line 346

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

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

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



360
361
# File 'lib/increase/models/card_create_params.rb', line 360

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

#settlement_amountInteger

The maximum settlement amount permitted in the given interval.

Returns:

  • (Integer)


353
# File 'lib/increase/models/card_create_params.rb', line 353

required :settlement_amount, Integer

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/increase/models/card_create_params.rb', line 395