Class: Stripe::Issuing::CardholderService::CreateParams::SpendingControls

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/issuing/cardholder_service.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, spending_limits_currency: nil) ⇒ SpendingControls

Returns a new instance of SpendingControls.



228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/stripe/services/issuing/cardholder_service.rb', line 228

def initialize(
  allowed_categories: nil,
  allowed_merchant_countries: nil,
  blocked_categories: nil,
  blocked_merchant_countries: nil,
  spending_limits: nil,
  spending_limits_currency: 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
  @spending_limits_currency = spending_limits_currency
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`.



216
217
218
# File 'lib/stripe/services/issuing/cardholder_service.rb', line 216

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.



218
219
220
# File 'lib/stripe/services/issuing/cardholder_service.rb', line 218

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`.



220
221
222
# File 'lib/stripe/services/issuing/cardholder_service.rb', line 220

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.



222
223
224
# File 'lib/stripe/services/issuing/cardholder_service.rb', line 222

def blocked_merchant_countries
  @blocked_merchant_countries
end

#spending_limitsObject

Limit spending with amount-based rules that apply across this cardholder’s cards.



224
225
226
# File 'lib/stripe/services/issuing/cardholder_service.rb', line 224

def spending_limits
  @spending_limits
end

#spending_limits_currencyObject

Currency of amounts within ‘spending_limits`. Defaults to your merchant country’s currency.



226
227
228
# File 'lib/stripe/services/issuing/cardholder_service.rb', line 226

def spending_limits_currency
  @spending_limits_currency
end