Class: Stripe::Issuing::CardService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/issuing/card_service.rb

Defined Under Namespace

Classes: CreateParams, ListParams, RetrieveParams, UpdateParams

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

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

Creates an Issuing Card object.



471
472
473
474
475
476
477
478
479
# File 'lib/stripe/services/issuing/card_service.rb', line 471

def create(params = {}, opts = {})
  request(
    method: :post,
    path: "/v1/issuing/cards",
    params: params,
    opts: opts,
    base_address: :api
  )
end

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

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



482
483
484
485
486
487
488
489
490
# File 'lib/stripe/services/issuing/card_service.rb', line 482

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v1/issuing/cards",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(card, params = {}, opts = {}) ⇒ Object

Retrieves an Issuing Card object.



493
494
495
496
497
498
499
500
501
# File 'lib/stripe/services/issuing/card_service.rb', line 493

def retrieve(card, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/issuing/cards/%<card>s", { card: CGI.escape(card) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#update(card, params = {}, opts = {}) ⇒ Object

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



504
505
506
507
508
509
510
511
512
# File 'lib/stripe/services/issuing/card_service.rb', line 504

def update(card, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/issuing/cards/%<card>s", { card: CGI.escape(card) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end