mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-06 00:02:18 -04:00
* Support for APIs in the new API version 2024-09-30.acacia (#1458) * remove parseSnapshotEvent (#1463) * Bump version to 13.0.0 * Fixed API Version --------- Co-authored-by: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Co-authored-by: Ramya Rao <ramya@stripe.com> Co-authored-by: Prathmesh Ranaut <prathmesh@stripe.com>
67 lines
2.3 KiB
Ruby
67 lines
2.3 KiB
Ruby
# File generated from our OpenAPI spec
|
|
# frozen_string_literal: true
|
|
|
|
module Stripe
|
|
class PaymentMethodDomainService < StripeService
|
|
# Creates a payment method domain.
|
|
def create(params = {}, opts = {})
|
|
request(
|
|
method: :post,
|
|
path: "/v1/payment_method_domains",
|
|
params: params,
|
|
opts: opts,
|
|
base_address: :api
|
|
)
|
|
end
|
|
|
|
# Lists the details of existing payment method domains.
|
|
def list(params = {}, opts = {})
|
|
request(
|
|
method: :get,
|
|
path: "/v1/payment_method_domains",
|
|
params: params,
|
|
opts: opts,
|
|
base_address: :api
|
|
)
|
|
end
|
|
|
|
# Retrieves the details of an existing payment method domain.
|
|
def retrieve(payment_method_domain, params = {}, opts = {})
|
|
request(
|
|
method: :get,
|
|
path: format("/v1/payment_method_domains/%<payment_method_domain>s", { payment_method_domain: CGI.escape(payment_method_domain) }),
|
|
params: params,
|
|
opts: opts,
|
|
base_address: :api
|
|
)
|
|
end
|
|
|
|
# Updates an existing payment method domain.
|
|
def update(payment_method_domain, params = {}, opts = {})
|
|
request(
|
|
method: :post,
|
|
path: format("/v1/payment_method_domains/%<payment_method_domain>s", { payment_method_domain: CGI.escape(payment_method_domain) }),
|
|
params: params,
|
|
opts: opts,
|
|
base_address: :api
|
|
)
|
|
end
|
|
|
|
# Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
|
|
# The payment method doesn't appear in Elements for this domain until it is active.
|
|
#
|
|
# To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.
|
|
#
|
|
# Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
|
|
def validate(payment_method_domain, params = {}, opts = {})
|
|
request(
|
|
method: :post,
|
|
path: format("/v1/payment_method_domains/%<payment_method_domain>s/validate", { payment_method_domain: CGI.escape(payment_method_domain) }),
|
|
params: params,
|
|
opts: opts,
|
|
base_address: :api
|
|
)
|
|
end
|
|
end
|
|
end
|