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.



463
464
465
466
467
468
469
470
471
# File 'lib/stripe/services/issuing/card_service.rb', line 463

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.



474
475
476
477
478
479
480
481
482
# File 'lib/stripe/services/issuing/card_service.rb', line 474

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.



485
486
487
488
489
490
491
492
493
# File 'lib/stripe/services/issuing/card_service.rb', line 485

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.



496
497
498
499
500
501
502
503
504
# File 'lib/stripe/services/issuing/card_service.rb', line 496

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