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

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

Defined Under Namespace

Classes: MaximumAuthorizationCount, MerchantAcceptorIdentifier, MerchantCategoryCode, MerchantCountry, SpendingLimit

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
# File 'lib/increase/models/card_update_params.rb', line 75

class AuthorizationControls < Increase::Internal::Type::BaseModel
  # @!attribute maximum_authorization_count
  #   Limits the number of authorizations that can be approved on this card.
  #
  #   @return [Increase::Models::CardUpdateParams::AuthorizationControls::MaximumAuthorizationCount, nil]
  optional :maximum_authorization_count,
           -> { Increase::CardUpdateParams::AuthorizationControls::MaximumAuthorizationCount }

  # @!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 spending_limits
  #   Spending limits for this card. The most restrictive limit applies if multiple
  #   limits match.
  #
  #   @return [Array<Increase::Models::CardUpdateParams::AuthorizationControls::SpendingLimit>, nil]
  optional :spending_limits,
           -> { Increase::Internal::Type::ArrayOf[Increase::CardUpdateParams::AuthorizationControls::SpendingLimit] }

  # @!method initialize(maximum_authorization_count: nil, merchant_acceptor_identifier: nil, merchant_category_code: nil, merchant_country: nil, spending_limits: 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 maximum_authorization_count [Increase::Models::CardUpdateParams::AuthorizationControls::MaximumAuthorizationCount] Limits the number of authorizations that can be approved on this card.
  #
  #   @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 spending_limits [Array<Increase::Models::CardUpdateParams::AuthorizationControls::SpendingLimit>] Spending limits for this card. The most restrictive limit applies if multiple li

  # @see Increase::Models::CardUpdateParams::AuthorizationControls#maximum_authorization_count
  class MaximumAuthorizationCount < Increase::Internal::Type::BaseModel
    # @!attribute all_time
    #   The maximum number of authorizations that can be approved on this card over its
    #   lifetime.
    #
    #   @return [Integer]
    required :all_time, Integer

    # @!method initialize(all_time:)
    #   Some parameter documentations has been truncated, see
    #   {Increase::Models::CardUpdateParams::AuthorizationControls::MaximumAuthorizationCount}
    #   for more details.
    #
    #   Limits the number of authorizations that can be approved on this card.
    #
    #   @param all_time [Integer] The maximum number of authorizations that can be approved on this card over its
  end

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

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

    # @!method initialize(interval:, settlement_amount:, merchant_category_codes: nil)
    #   Some parameter documentations has been truncated, see
    #   {Increase::Models::CardUpdateParams::AuthorizationControls::SpendingLimit} for
    #   more details.
    #
    #   @param interval [Symbol, Increase::Models::CardUpdateParams::AuthorizationControls::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::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::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

Instance Attribute Details

#maximum_authorization_countIncrease::Models::CardUpdateParams::AuthorizationControls::MaximumAuthorizationCount?

Limits the number of authorizations that can be approved on this card.



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

optional :maximum_authorization_count,
-> { Increase::CardUpdateParams::AuthorizationControls::MaximumAuthorizationCount }

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

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



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

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.



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

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.



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

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

#spending_limitsArray<Increase::Models::CardUpdateParams::AuthorizationControls::SpendingLimit>?

Spending limits for this card. The most restrictive limit applies if multiple limits match.



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

optional :spending_limits,
-> { Increase::Internal::Type::ArrayOf[Increase::CardUpdateParams::AuthorizationControls::SpendingLimit] }