From e27750290e598e20b3ff6b69bd23b68abe11d4a0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 20:03:05 +0000 Subject: [PATCH 1/2] Update generated code for v503 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/account_link.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index fabb112f2..9ace739c7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v495 \ No newline at end of file +v503 \ No newline at end of file diff --git a/lib/stripe/resources/account_link.rb b/lib/stripe/resources/account_link.rb index 071ad020f..f682debed 100644 --- a/lib/stripe/resources/account_link.rb +++ b/lib/stripe/resources/account_link.rb @@ -5,7 +5,7 @@ module Stripe # Account Links are the means by which a Connect platform grants a connected account permission to access # Stripe-hosted applications, such as Connect Onboarding. # - # Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding) + # Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding) class AccountLink < APIResource extend Stripe::APIOperations::Create From 420b8088ce2712fbeee33cfd915b6b1c8eef096e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 14:46:16 +0000 Subject: [PATCH 2/2] Update generated code for v507 --- OPENAPI_VERSION | 2 +- lib/stripe/object_types.rb | 1 + lib/stripe/resources.rb | 1 + lib/stripe/resources/payment_method_domain.rb | 34 +++++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 lib/stripe/resources/payment_method_domain.rb diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 9ace739c7..c1619cf1f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v503 \ No newline at end of file +v507 \ No newline at end of file diff --git a/lib/stripe/object_types.rb b/lib/stripe/object_types.rb index 2f640bb31..0b4b2ecac 100644 --- a/lib/stripe/object_types.rb +++ b/lib/stripe/object_types.rb @@ -66,6 +66,7 @@ def self.object_names_to_classes PaymentIntent::OBJECT_NAME => PaymentIntent, PaymentLink::OBJECT_NAME => PaymentLink, PaymentMethod::OBJECT_NAME => PaymentMethod, + PaymentMethodDomain::OBJECT_NAME => PaymentMethodDomain, Payout::OBJECT_NAME => Payout, Person::OBJECT_NAME => Person, Plan::OBJECT_NAME => Plan, diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb index e536bb1a7..276204a37 100644 --- a/lib/stripe/resources.rb +++ b/lib/stripe/resources.rb @@ -53,6 +53,7 @@ require "stripe/resources/payment_intent" require "stripe/resources/payment_link" require "stripe/resources/payment_method" +require "stripe/resources/payment_method_domain" require "stripe/resources/payout" require "stripe/resources/person" require "stripe/resources/plan" diff --git a/lib/stripe/resources/payment_method_domain.rb b/lib/stripe/resources/payment_method_domain.rb new file mode 100644 index 000000000..184784336 --- /dev/null +++ b/lib/stripe/resources/payment_method_domain.rb @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A payment method domain represents a web domain that you have registered with Stripe. + # Stripe Elements use registered payment method domains to control where certain payment methods are shown. + # + # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + class PaymentMethodDomain < APIResource + extend Stripe::APIOperations::Create + extend Stripe::APIOperations::List + include Stripe::APIOperations::Save + + OBJECT_NAME = "payment_method_domain" + + def validate(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/payment_method_domains/%s/validate", { payment_method_domain: CGI.escape(self["id"]) }), + params: params, + opts: opts + ) + end + + def self.validate(payment_method_domain, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/payment_method_domains/%s/validate", { payment_method_domain: CGI.escape(payment_method_domain) }), + params: params, + opts: opts + ) + end + end +end