helenye-stripe ce8d7ca4cc
Add methods for dynamically referenced constants (#1327)
* Update dynamic constant references

* Manual additionsg

* Fix lint

* Use const_Get

* Remove puts
2024-02-09 17:15:39 -08:00

33 lines
1.1 KiB
Ruby

# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
module Issuing
# An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe.
class Token < APIResource
extend Stripe::APIOperations::List
include Stripe::APIOperations::Save
OBJECT_NAME = "issuing.token"
def self.object_name
"issuing.token"
end
# Lists all Issuing Token objects for a given card.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: filters, opts: opts)
end
# Attempts to update the specified Issuing Token object to the status specified.
def self.update(id, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/issuing/tokens/%<id>s", { id: CGI.escape(id) }),
params: params,
opts: opts
)
end
end
end
end