Class: Composio::PaymentApi

Inherits:
Object
  • Object
show all
Defined in:
lib/composio/api/payment_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_clientObject

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

Parameters:

  • plan (Plan)
  • body (CreateCheckoutSessionReqDto)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



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

Parameters:

  • plan (Plan)
  • body (CreateCheckoutSessionReqDto)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



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

Parameters:

  • session_id (String)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



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

Parameters:

  • session_id (String)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



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

Parameters:

  • invoice_id (String)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



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

Parameters:

  • invoice_id (String)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



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

Parameters:

  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



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

Parameters:

  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



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

Parameters:

  • body (Object) (defaults to: SENTINEL)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



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

Parameters:

  • body (Object) (defaults to: SENTINEL)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



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