Class: Stripe::Issuing::Cardholder

Inherits:
APIResource show all
Extended by:
APIOperations::Create, APIOperations::List
Includes:
APIOperations::Save
Defined in:
lib/stripe/resources/issuing/cardholder.rb

Overview

An Issuing ‘Cardholder` object represents an individual or business entity who is [issued](docs.stripe.com/issuing) cards.

Related guide: [How to create a cardholder](docs.stripe.com/issuing/cards/virtual/issue-cards#create-cardholder)

Defined Under Namespace

Classes: Billing, Company, Individual, Redaction, Requirements, SpendingControls

Constant Summary collapse

OBJECT_NAME =
"issuing.cardholder"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods included from APIOperations::Create

create

Methods included from APIOperations::List

list

Methods included from APIOperations::Save

included, #save

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#billingObject (readonly)

Attribute for field billing



231
232
233
# File 'lib/stripe/resources/issuing/cardholder.rb', line 231

def billing
  @billing
end

#companyObject (readonly)

Additional information about a ‘company` cardholder.



233
234
235
# File 'lib/stripe/resources/issuing/cardholder.rb', line 233

def company
  @company
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



235
236
237
# File 'lib/stripe/resources/issuing/cardholder.rb', line 235

def created
  @created
end

#emailObject (readonly)

The cardholder’s email address.



237
238
239
# File 'lib/stripe/resources/issuing/cardholder.rb', line 237

def email
  @email
end

#idObject (readonly)

Unique identifier for the object.



239
240
241
# File 'lib/stripe/resources/issuing/cardholder.rb', line 239

def id
  @id
end

#individualObject (readonly)

Additional information about an ‘individual` cardholder.



241
242
243
# File 'lib/stripe/resources/issuing/cardholder.rb', line 241

def individual
  @individual
end

#livemodeObject (readonly)

If the object exists in live mode, the value is ‘true`. If the object exists in test mode, the value is `false`.



243
244
245
# File 'lib/stripe/resources/issuing/cardholder.rb', line 243

def livemode
  @livemode
end

#metadataObject (readonly)

Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



245
246
247
# File 'lib/stripe/resources/issuing/cardholder.rb', line 245

def 
  @metadata
end

#nameObject (readonly)

The cardholder’s name. This will be printed on cards issued to them.



247
248
249
# File 'lib/stripe/resources/issuing/cardholder.rb', line 247

def name
  @name
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



249
250
251
# File 'lib/stripe/resources/issuing/cardholder.rb', line 249

def object
  @object
end

#phone_numberObject (readonly)

The cardholder’s phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](docs.stripe.com/issuing/3d-secure#when-is-3d-secure-applied) for more details.



251
252
253
# File 'lib/stripe/resources/issuing/cardholder.rb', line 251

def phone_number
  @phone_number
end

#preferred_localesObject (readonly)

The cardholder’s preferred locales (languages), ordered by preference. Locales can be ‘da`, `de`, `en`, `es`, `fr`, `it`, `pl`, or `sv`.

This changes the language of the [3D Secure flow](https://docs.stripe.com/issuing/3d-secure) and one-time password messages sent to the cardholder.


254
255
256
# File 'lib/stripe/resources/issuing/cardholder.rb', line 254

def preferred_locales
  @preferred_locales
end

#redactionObject (readonly)

Redaction status of this cardholder. If the cardholder is not redacted, this field will be null.



256
257
258
# File 'lib/stripe/resources/issuing/cardholder.rb', line 256

def redaction
  @redaction
end

#requirementsObject (readonly)

Attribute for field requirements



258
259
260
# File 'lib/stripe/resources/issuing/cardholder.rb', line 258

def requirements
  @requirements
end

#spending_controlsObject (readonly)

Rules that control spending across this cardholder’s cards. Refer to our [documentation](docs.stripe.com/issuing/controls/spending-controls) for more details.



260
261
262
# File 'lib/stripe/resources/issuing/cardholder.rb', line 260

def spending_controls
  @spending_controls
end

#statusObject (readonly)

Specifies whether to permit authorizations on this cardholder’s cards.



262
263
264
# File 'lib/stripe/resources/issuing/cardholder.rb', line 262

def status
  @status
end

#typeObject (readonly)

One of ‘individual` or `company`. See [Choose a cardholder type](docs.stripe.com/issuing/other/choose-cardholder) for more details.



264
265
266
# File 'lib/stripe/resources/issuing/cardholder.rb', line 264

def type
  @type
end

Class Method Details

.create(params = {}, opts = {}) ⇒ Object

Creates a new Issuing Cardholder object that can be issued cards.



267
268
269
270
271
272
273
274
# File 'lib/stripe/resources/issuing/cardholder.rb', line 267

def self.create(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: "/v1/issuing/cardholders",
    params: params,
    opts: opts
  )
end

.field_remappingsObject



307
308
309
# File 'lib/stripe/resources/issuing/cardholder.rb', line 307

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



296
297
298
299
300
301
302
303
304
305
# File 'lib/stripe/resources/issuing/cardholder.rb', line 296

def self.inner_class_types
  @inner_class_types = {
    billing: Billing,
    company: Company,
    individual: Individual,
    redaction: Redaction,
    requirements: Requirements,
    spending_controls: SpendingControls,
  }
end

.list(params = {}, opts = {}) ⇒ Object

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.



277
278
279
280
281
282
283
284
# File 'lib/stripe/resources/issuing/cardholder.rb', line 277

def self.list(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/issuing/cardholders",
    params: params,
    opts: opts
  )
end

.object_nameObject



15
16
17
# File 'lib/stripe/resources/issuing/cardholder.rb', line 15

def self.object_name
  "issuing.cardholder"
end

.update(cardholder, params = {}, opts = {}) ⇒ Object

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.



287
288
289
290
291
292
293
294
# File 'lib/stripe/resources/issuing/cardholder.rb', line 287

def self.update(cardholder, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/issuing/cardholders/%<cardholder>s", { cardholder: CGI.escape(cardholder) }),
    params: params,
    opts: opts
  )
end