Class: Dodopayments::Resources::Customers::CustomerPortal
- Inherits:
-
Object
- Object
- Dodopayments::Resources::Customers::CustomerPortal
- Defined in:
- lib/dodopayments/resources/customers/customer_portal.rb
Instance Method Summary collapse
- #create(customer_id, send_email: nil, request_options: {}) ⇒ Dodopayments::Models::CustomerPortalSession
-
#initialize(client:) ⇒ CustomerPortal
constructor
private
A new instance of CustomerPortal.
Constructor Details
#initialize(client:) ⇒ CustomerPortal
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CustomerPortal.
32 33 34 |
# File 'lib/dodopayments/resources/customers/customer_portal.rb', line 32 def initialize(client:) @client = client end |
Instance Method Details
#create(customer_id, send_email: nil, request_options: {}) ⇒ Dodopayments::Models::CustomerPortalSession
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/dodopayments/resources/customers/customer_portal.rb', line 18 def create(customer_id, params = {}) parsed, = Dodopayments::Customers::CustomerPortalCreateParams.dump_request(params) @client.request( method: :post, path: ["customers/%1$s/customer-portal/session", customer_id], query: parsed, model: Dodopayments::CustomerPortalSession, options: ) end |