Class: Composio::PaymentApi
- Inherits:
-
Object
- Object
- Composio::PaymentApi
- Defined in:
- lib/composio/api/payment_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_checkout_session(plan:, extra: {}) ⇒ Object
Create checkout session.
-
#create_checkout_session_with_http_info(plan:, extra: {}) ⇒ Object
Create checkout session.
-
#get_checkout_session_status(session_id:, extra: {}) ⇒ Object
Get checkout session status.
-
#get_checkout_session_status_with_http_info(session_id:, extra: {}) ⇒ Object
Get checkout session status.
-
#get_invoice(invoice_id:, extra: {}) ⇒ Object
Get invoice.
-
#get_invoice_with_http_info(invoice_id:, extra: {}) ⇒ Object
Get invoice.
-
#get_invoices(extra: {}) ⇒ Object
Get invoices.
-
#get_invoices_with_http_info(extra: {}) ⇒ Object
Get invoices.
-
#handle_stripe_webhook(body: SENTINEL, extra: {}) ⇒ Object
Handle stripe webhook.
-
#handle_stripe_webhook_with_http_info(body: SENTINEL, extra: {}) ⇒ Object
Handle stripe webhook.
-
#initialize(api_client = ApiClient.default) ⇒ PaymentApi
constructor
A new instance of PaymentApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PaymentApi
Returns a new instance of PaymentApi.
15 16 17 |
# File 'lib/composio/api/payment_api.rb', line 15 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
13 14 15 |
# File 'lib/composio/api/payment_api.rb', line 13 def api_client @api_client end |
Instance Method Details
#create_checkout_session(plan:, extra: {}) ⇒ Object
Create checkout session
24 25 26 27 28 29 30 |
# File 'lib/composio/api/payment_api.rb', line 24 def create_checkout_session(plan:, extra: {}) _body = {} _body[:plan] = plan if plan != SENTINEL extra[:create_checkout_session_req_dto] = _body if !_body.empty? api_response = create_checkout_session_with_http_info_impl(extra) api_response.data end |
#create_checkout_session_with_http_info(plan:, extra: {}) ⇒ Object
Create checkout session
37 38 39 40 41 42 |
# File 'lib/composio/api/payment_api.rb', line 37 def create_checkout_session_with_http_info(plan:, extra: {}) _body = {} _body[:plan] = plan if plan != SENTINEL extra[:create_checkout_session_req_dto] = _body if !_body.empty? create_checkout_session_with_http_info_impl(extra) end |
#get_checkout_session_status(session_id:, extra: {}) ⇒ Object
Get checkout session status
111 112 113 114 |
# File 'lib/composio/api/payment_api.rb', line 111 def get_checkout_session_status(session_id:, extra: {}) api_response = get_checkout_session_status_with_http_info_impl(session_id, extra) api_response.data end |
#get_checkout_session_status_with_http_info(session_id:, extra: {}) ⇒ Object
Get checkout session status
120 121 122 |
# File 'lib/composio/api/payment_api.rb', line 120 def get_checkout_session_status_with_http_info(session_id:, extra: {}) get_checkout_session_status_with_http_info_impl(session_id, extra) end |
#get_invoice(invoice_id:, extra: {}) ⇒ Object
Get invoice
195 196 197 198 |
# File 'lib/composio/api/payment_api.rb', line 195 def get_invoice(invoice_id:, extra: {}) api_response = get_invoice_with_http_info_impl(invoice_id, extra) api_response.data end |
#get_invoice_with_http_info(invoice_id:, extra: {}) ⇒ Object
Get invoice
204 205 206 |
# File 'lib/composio/api/payment_api.rb', line 204 def get_invoice_with_http_info(invoice_id:, extra: {}) get_invoice_with_http_info_impl(invoice_id, extra) end |
#get_invoices(extra: {}) ⇒ Object
Get invoices
278 279 280 281 |
# File 'lib/composio/api/payment_api.rb', line 278 def get_invoices(extra: {}) api_response = get_invoices_with_http_info_impl(extra) api_response.data end |
#get_invoices_with_http_info(extra: {}) ⇒ Object
Get invoices
286 287 288 |
# File 'lib/composio/api/payment_api.rb', line 286 def get_invoices_with_http_info(extra: {}) get_invoices_with_http_info_impl(extra) end |
#handle_stripe_webhook(body: SENTINEL, extra: {}) ⇒ Object
Handle stripe webhook
350 351 352 353 354 |
# File 'lib/composio/api/payment_api.rb', line 350 def handle_stripe_webhook(body: SENTINEL, extra: {}) extra[:body] = body if body != SENTINEL api_response = handle_stripe_webhook_with_http_info_impl(extra) api_response.data end |
#handle_stripe_webhook_with_http_info(body: SENTINEL, extra: {}) ⇒ Object
Handle stripe webhook
360 361 362 363 |
# File 'lib/composio/api/payment_api.rb', line 360 def handle_stripe_webhook_with_http_info(body: SENTINEL, extra: {}) extra[:body] = body if body != SENTINEL handle_stripe_webhook_with_http_info_impl(extra) end |