Class: Increase::Models::CardUpdateParams::AuthorizationControls

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

Defined Under Namespace

Classes: MerchantAcceptorIdentifier, MerchantCategoryCode, MerchantCountry, Usage

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

#initialize(country:) ⇒ Object

Parameters:

  • country (String)

    The ISO 3166-1 alpha-2 country code.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
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
410
411
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
# File 'lib/increase/models/card_update_params.rb', line 75

class AuthorizationControls < Increase::Internal::Type::BaseModel
  # @!attribute merchant_acceptor_identifier
  #   Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations
  #   on this card.
  #
  #   @return [Increase::Models::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier, nil]
  optional :merchant_acceptor_identifier,
           -> { Increase::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier }

  # @!attribute merchant_category_code
  #   Restricts which Merchant Category Codes are allowed or blocked for
  #   authorizations on this card.
  #
  #   @return [Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCategoryCode, nil]
  optional :merchant_category_code,
           -> { Increase::CardUpdateParams::AuthorizationControls::MerchantCategoryCode }

  # @!attribute merchant_country
  #   Restricts which merchant countries are allowed or blocked for authorizations on
  #   this card.
  #
  #   @return [Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCountry, nil]
  optional :merchant_country, -> { Increase::CardUpdateParams::AuthorizationControls::MerchantCountry }

  # @!attribute usage
  #   Controls how many times this card can be used.
  #
  #   @return [Increase::Models::CardUpdateParams::AuthorizationControls::Usage, nil]
  optional :usage, -> { Increase::CardUpdateParams::AuthorizationControls::Usage }

  # @!method initialize(merchant_acceptor_identifier: nil, merchant_category_code: nil, merchant_country: nil, usage: nil)
  #   Some parameter documentations has been truncated, see
  #   {Increase::Models::CardUpdateParams::AuthorizationControls} for more details.
  #
  #   Controls that restrict how this card can be used.
  #
  #   @param merchant_acceptor_identifier [Increase::Models::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier] Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations
  #
  #   @param merchant_category_code [Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCategoryCode] Restricts which Merchant Category Codes are allowed or blocked for authorization
  #
  #   @param merchant_country [Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCountry] Restricts which merchant countries are allowed or blocked for authorizations on
  #
  #   @param usage [Increase::Models::CardUpdateParams::AuthorizationControls::Usage] Controls how many times this card can be used.

  # @see Increase::Models::CardUpdateParams::AuthorizationControls#merchant_acceptor_identifier
  class MerchantAcceptorIdentifier < Increase::Internal::Type::BaseModel
    # @!attribute allowed
    #   The Merchant Acceptor IDs that are allowed for authorizations on this card.
    #   Authorizations with Merchant Acceptor IDs not in this list will be declined.
    #
    #   @return [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier::Allowed>, nil]
    optional :allowed,
             -> { Increase::Internal::Type::ArrayOf[Increase::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier::Allowed] }

    # @!attribute blocked
    #   The Merchant Acceptor IDs that are blocked for authorizations on this card.
    #   Authorizations with Merchant Acceptor IDs in this list will be declined.
    #
    #   @return [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier::Blocked>, nil]
    optional :blocked,
             -> { Increase::Internal::Type::ArrayOf[Increase::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier::Blocked] }

    # @!method initialize(allowed: nil, blocked: nil)
    #   Some parameter documentations has been truncated, see
    #   {Increase::Models::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier}
    #   for more details.
    #
    #   Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations
    #   on this card.
    #
    #   @param allowed [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier::Allowed>] The Merchant Acceptor IDs that are allowed for authorizations on this card. Auth
    #
    #   @param blocked [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier::Blocked>] The Merchant Acceptor IDs that are blocked for authorizations on this card. Auth

    class Allowed < Increase::Internal::Type::BaseModel
      # @!attribute identifier
      #   The Merchant Acceptor ID.
      #
      #   @return [String]
      required :identifier, String

      # @!method initialize(identifier:)
      #   @param identifier [String] The Merchant Acceptor ID.
    end

    class Blocked < Increase::Internal::Type::BaseModel
      # @!attribute identifier
      #   The Merchant Acceptor ID.
      #
      #   @return [String]
      required :identifier, String

      # @!method initialize(identifier:)
      #   @param identifier [String] The Merchant Acceptor ID.
    end
  end

  # @see Increase::Models::CardUpdateParams::AuthorizationControls#merchant_category_code
  class MerchantCategoryCode < Increase::Internal::Type::BaseModel
    # @!attribute allowed
    #   The Merchant Category Codes that are allowed for authorizations on this card.
    #   Authorizations with Merchant Category Codes not in this list will be declined.
    #
    #   @return [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCategoryCode::Allowed>, nil]
    optional :allowed,
             -> { Increase::Internal::Type::ArrayOf[Increase::CardUpdateParams::AuthorizationControls::MerchantCategoryCode::Allowed] }

    # @!attribute blocked
    #   The Merchant Category Codes that are blocked for authorizations on this card.
    #   Authorizations with Merchant Category Codes in this list will be declined.
    #
    #   @return [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCategoryCode::Blocked>, nil]
    optional :blocked,
             -> { Increase::Internal::Type::ArrayOf[Increase::CardUpdateParams::AuthorizationControls::MerchantCategoryCode::Blocked] }

    # @!method initialize(allowed: nil, blocked: nil)
    #   Some parameter documentations has been truncated, see
    #   {Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCategoryCode}
    #   for more details.
    #
    #   Restricts which Merchant Category Codes are allowed or blocked for
    #   authorizations on this card.
    #
    #   @param allowed [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCategoryCode::Allowed>] The Merchant Category Codes that are allowed for authorizations on this card. Au
    #
    #   @param blocked [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCategoryCode::Blocked>] The Merchant Category Codes that are blocked for authorizations on this card. Au

    class Allowed < 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

    class Blocked < 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

  # @see Increase::Models::CardUpdateParams::AuthorizationControls#merchant_country
  class MerchantCountry < Increase::Internal::Type::BaseModel
    # @!attribute allowed
    #   The merchant countries that are allowed for authorizations on this card.
    #   Authorizations with merchant countries not in this list will be declined.
    #
    #   @return [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCountry::Allowed>, nil]
    optional :allowed,
             -> { Increase::Internal::Type::ArrayOf[Increase::CardUpdateParams::AuthorizationControls::MerchantCountry::Allowed] }

    # @!attribute blocked
    #   The merchant countries that are blocked for authorizations on this card.
    #   Authorizations with merchant countries in this list will be declined.
    #
    #   @return [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCountry::Blocked>, nil]
    optional :blocked,
             -> { Increase::Internal::Type::ArrayOf[Increase::CardUpdateParams::AuthorizationControls::MerchantCountry::Blocked] }

    # @!method initialize(allowed: nil, blocked: nil)
    #   Some parameter documentations has been truncated, see
    #   {Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCountry} for
    #   more details.
    #
    #   Restricts which merchant countries are allowed or blocked for authorizations on
    #   this card.
    #
    #   @param allowed [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCountry::Allowed>] The merchant countries that are allowed for authorizations on this card. Authori
    #
    #   @param blocked [Array<Increase::Models::CardUpdateParams::AuthorizationControls::MerchantCountry::Blocked>] The merchant countries that are blocked for authorizations on this card. Authori

    class Allowed < Increase::Internal::Type::BaseModel
      # @!attribute country
      #   The ISO 3166-1 alpha-2 country code.
      #
      #   @return [String]
      required :country, String

      # @!method initialize(country:)
      #   @param country [String] The ISO 3166-1 alpha-2 country code.
    end

    class Blocked < Increase::Internal::Type::BaseModel
      # @!attribute country
      #   The ISO 3166-1 alpha-2 country code.
      #
      #   @return [String]
      required :country, String

      # @!method initialize(country:)
      #   @param country [String] The ISO 3166-1 alpha-2 country code.
    end
  end

  # @see Increase::Models::CardUpdateParams::AuthorizationControls#usage
  class Usage < Increase::Internal::Type::BaseModel
    # @!attribute category
    #   Whether the card is for a single use or multiple uses.
    #
    #   @return [Symbol, Increase::Models::CardUpdateParams::AuthorizationControls::Usage::Category]
    required :category, enum: -> { Increase::CardUpdateParams::AuthorizationControls::Usage::Category }

    # @!attribute multi_use
    #   Controls for multi-use cards. Required if and only if `category` is `multi_use`.
    #
    #   @return [Increase::Models::CardUpdateParams::AuthorizationControls::Usage::MultiUse, nil]
    optional :multi_use, -> { Increase::CardUpdateParams::AuthorizationControls::Usage::MultiUse }

    # @!attribute single_use
    #   Controls for single-use cards. Required if and only if `category` is
    #   `single_use`.
    #
    #   @return [Increase::Models::CardUpdateParams::AuthorizationControls::Usage::SingleUse, nil]
    optional :single_use, -> { Increase::CardUpdateParams::AuthorizationControls::Usage::SingleUse }

    # @!method initialize(category:, multi_use: nil, single_use: nil)
    #   Some parameter documentations has been truncated, see
    #   {Increase::Models::CardUpdateParams::AuthorizationControls::Usage} for more
    #   details.
    #
    #   Controls how many times this card can be used.
    #
    #   @param category [Symbol, Increase::Models::CardUpdateParams::AuthorizationControls::Usage::Category] Whether the card is for a single use or multiple uses.
    #
    #   @param multi_use [Increase::Models::CardUpdateParams::AuthorizationControls::Usage::MultiUse] Controls for multi-use cards. Required if and only if `category` is `multi_use`.
    #
    #   @param single_use [Increase::Models::CardUpdateParams::AuthorizationControls::Usage::SingleUse] Controls for single-use cards. Required if and only if `category` is `single_use

    # Whether the card is for a single use or multiple uses.
    #
    # @see Increase::Models::CardUpdateParams::AuthorizationControls::Usage#category
    module Category
      extend Increase::Internal::Type::Enum

      # The card can only be used for a single authorization.
      SINGLE_USE = :single_use

      # The card can be used for multiple authorizations.
      MULTI_USE = :multi_use

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

    # @see Increase::Models::CardUpdateParams::AuthorizationControls::Usage#multi_use
    class MultiUse < Increase::Internal::Type::BaseModel
      # @!attribute spending_limits
      #   Spending limits for this card. The most restrictive limit applies if multiple
      #   limits match.
      #
      #   @return [Array<Increase::Models::CardUpdateParams::AuthorizationControls::Usage::MultiUse::SpendingLimit>, nil]
      optional :spending_limits,
               -> { Increase::Internal::Type::ArrayOf[Increase::CardUpdateParams::AuthorizationControls::Usage::MultiUse::SpendingLimit] }

      # @!method initialize(spending_limits: nil)
      #   Some parameter documentations has been truncated, see
      #   {Increase::Models::CardUpdateParams::AuthorizationControls::Usage::MultiUse} for
      #   more details.
      #
      #   Controls for multi-use cards. Required if and only if `category` is `multi_use`.
      #
      #   @param spending_limits [Array<Increase::Models::CardUpdateParams::AuthorizationControls::Usage::MultiUse::SpendingLimit>] Spending limits for this card. The most restrictive limit applies if multiple li

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

        # 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
    end

    # @see Increase::Models::CardUpdateParams::AuthorizationControls::Usage#single_use
    class SingleUse < Increase::Internal::Type::BaseModel
      # @!attribute settlement_amount
      #   The settlement amount constraint for this single-use card.
      #
      #   @return [Increase::Models::CardUpdateParams::AuthorizationControls::Usage::SingleUse::SettlementAmount]
      required :settlement_amount,
               -> { Increase::CardUpdateParams::AuthorizationControls::Usage::SingleUse::SettlementAmount }

      # @!method initialize(settlement_amount:)
      #   Controls for single-use cards. Required if and only if `category` is
      #   `single_use`.
      #
      #   @param settlement_amount [Increase::Models::CardUpdateParams::AuthorizationControls::Usage::SingleUse::SettlementAmount] The settlement amount constraint for this single-use card.

      # @see Increase::Models::CardUpdateParams::AuthorizationControls::Usage::SingleUse#settlement_amount
      class SettlementAmount < Increase::Internal::Type::BaseModel
        # @!attribute comparison
        #   The operator used to compare the settlement amount.
        #
        #   @return [Symbol, Increase::Models::CardUpdateParams::AuthorizationControls::Usage::SingleUse::SettlementAmount::Comparison]
        required :comparison,
                 enum: -> { Increase::CardUpdateParams::AuthorizationControls::Usage::SingleUse::SettlementAmount::Comparison }

        # @!attribute value
        #   The settlement amount value.
        #
        #   @return [Integer]
        required :value, Integer

        # @!method initialize(comparison:, value:)
        #   The settlement amount constraint for this single-use card.
        #
        #   @param comparison [Symbol, Increase::Models::CardUpdateParams::AuthorizationControls::Usage::SingleUse::SettlementAmount::Comparison] The operator used to compare the settlement amount.
        #
        #   @param value [Integer] The settlement amount value.

        # The operator used to compare the settlement amount.
        #
        # @see Increase::Models::CardUpdateParams::AuthorizationControls::Usage::SingleUse::SettlementAmount#comparison
        module Comparison
          extend Increase::Internal::Type::Enum

          # The settlement amount must be exactly the specified value.
          EQUALS = :equals

          # The settlement amount must be less than or equal to the specified value.
          LESS_THAN_OR_EQUALS = :less_than_or_equals

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

Instance Attribute Details

#merchant_acceptor_identifierIncrease::Models::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier?

Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations on this card.



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

optional :merchant_acceptor_identifier,
-> { Increase::CardUpdateParams::AuthorizationControls::MerchantAcceptorIdentifier }

#merchant_category_codeIncrease::Models::CardUpdateParams::AuthorizationControls::MerchantCategoryCode?

Restricts which Merchant Category Codes are allowed or blocked for authorizations on this card.



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

optional :merchant_category_code,
-> { Increase::CardUpdateParams::AuthorizationControls::MerchantCategoryCode }

#merchant_countryIncrease::Models::CardUpdateParams::AuthorizationControls::MerchantCountry?

Restricts which merchant countries are allowed or blocked for authorizations on this card.



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

optional :merchant_country, -> { Increase::CardUpdateParams::AuthorizationControls::MerchantCountry }

#usageIncrease::Models::CardUpdateParams::AuthorizationControls::Usage?

Controls how many times this card can be used.



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

optional :usage, -> { Increase::CardUpdateParams::AuthorizationControls::Usage }