Class: Stripe::PaymentMethodDomainService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::PaymentMethodDomainService
- Defined in:
- lib/stripe/services/payment_method_domain_service.rb
Defined Under Namespace
Classes: CreateParams, ListParams, RetrieveParams, UpdateParams, ValidateParams
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 such as Apple Pay require additional steps to verify 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.
91 92 93 94 95 96 97 98 99 |
# File 'lib/stripe/services/payment_method_domain_service.rb', line 91 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.
102 103 104 105 106 107 108 109 110 |
# File 'lib/stripe/services/payment_method_domain_service.rb', line 102 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.
113 114 115 116 117 118 119 120 121 |
# File 'lib/stripe/services/payment_method_domain_service.rb', line 113 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.
124 125 126 127 128 129 130 131 132 |
# File 'lib/stripe/services/payment_method_domain_service.rb', line 124 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 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](stripe.com/docs/payments/payment-methods/pmd-registration).
140 141 142 143 144 145 146 147 148 |
# File 'lib/stripe/services/payment_method_domain_service.rb', line 140 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 |