Class: Stripe::Issuing::Card::CreateParams::SpendingControls

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/issuing/card.rb

Defined Under Namespace

Classes: SpendingLimit

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(allowed_categories: nil, allowed_merchant_countries: nil, blocked_categories: nil, blocked_merchant_countries: nil, spending_limits: nil) ⇒ SpendingControls

Returns a new instance of SpendingControls.



395
396
397
398
399
400
401
402
403
404
405
406
407
# File 'lib/stripe/resources/issuing/card.rb', line 395

def initialize(
  allowed_categories: nil,
  allowed_merchant_countries: nil,
  blocked_categories: nil,
  blocked_merchant_countries: nil,
  spending_limits: nil
)
  @allowed_categories = allowed_categories
  @allowed_merchant_countries = allowed_merchant_countries
  @blocked_categories = blocked_categories
  @blocked_merchant_countries = blocked_merchant_countries
  @spending_limits = spending_limits
end

Instance Attribute Details

#allowed_categoriesObject

Array of strings containing [categories](stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with ‘blocked_categories`.



381
382
383
# File 'lib/stripe/resources/issuing/card.rb', line 381

def allowed_categories
  @allowed_categories
end

#allowed_merchant_countriesObject

Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. ‘US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.



384
385
386
# File 'lib/stripe/resources/issuing/card.rb', line 384

def allowed_merchant_countries
  @allowed_merchant_countries
end

#blocked_categoriesObject

Array of strings containing [categories](stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with ‘allowed_categories`.



387
388
389
# File 'lib/stripe/resources/issuing/card.rb', line 387

def blocked_categories
  @blocked_categories
end

#blocked_merchant_countriesObject

Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. ‘US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.



390
391
392
# File 'lib/stripe/resources/issuing/card.rb', line 390

def blocked_merchant_countries
  @blocked_merchant_countries
end

#spending_limitsObject

Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its ‘replacement_for` card and that card’s ‘replacement_for` card, up the chain).



393
394
395
# File 'lib/stripe/resources/issuing/card.rb', line 393

def spending_limits
  @spending_limits
end