Class: Stripe::PaymentMethodDomainService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::PaymentMethodDomainService
- Defined in:
- lib/stripe/services/payment_method_domain_service.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Creates a payment method domain.
-
#list(params = {}, opts = {}) ⇒ Object
Lists the details of existing payment method domains.
-
#retrieve(payment_method_domain, params = {}, opts = {}) ⇒ Object
Retrieves the details of an existing payment method domain.
-
#update(payment_method_domain, params = {}, opts = {}) ⇒ Object
Updates an existing payment method domain.
-
#validate(payment_method_domain, params = {}, opts = {}) ⇒ Object
Some payment methods might require additional steps to register a domain.
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 a payment method domain.
7 8 9 10 11 12 13 14 15 |
# File 'lib/stripe/services/payment_method_domain_service.rb', line 7 def create(params = {}, opts = {}) request( method: :post, path: "/v1/payment_method_domains", params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Lists the details of existing payment method domains.
18 19 20 21 22 23 24 25 26 |
# File 'lib/stripe/services/payment_method_domain_service.rb', line 18 def list(params = {}, opts = {}) request( method: :get, path: "/v1/payment_method_domains", params: params, opts: opts, base_address: :api ) end |
#retrieve(payment_method_domain, params = {}, opts = {}) ⇒ Object
Retrieves the details of an existing payment method domain.
29 30 31 32 33 34 35 36 37 |
# File 'lib/stripe/services/payment_method_domain_service.rb', line 29 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 |
#update(payment_method_domain, params = {}, opts = {}) ⇒ Object
Updates an existing payment method domain.
40 41 42 43 44 45 46 47 48 |
# File 'lib/stripe/services/payment_method_domain_service.rb', line 40 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 |
#validate(payment_method_domain, params = {}, opts = {}) ⇒ Object
Some payment methods might require additional steps to register 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 or Embedded Checkout for this domain until it is active.
To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint.
Related guides: [Payment method domains](docs.stripe.com/docs/payments/payment-methods/pmd-registration).
56 57 58 59 60 61 62 63 64 |
# File 'lib/stripe/services/payment_method_domain_service.rb', line 56 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 |