Skip to content

Latest commit

 

History

History
171 lines (121 loc) · 10.9 KB

File metadata and controls

171 lines (121 loc) · 10.9 KB

PaymentServiceDefinitions

Overview

Available Operations

  • list - List payment service definitions
  • get - Get a payment service definition
  • session - Create a session for a payment service definition

list

List the definitions of each payment service that can be configured.

Example Usage

from gr4vy import Gr4vy
import os


with Gr4vy(
    bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:

    res = g_client.payment_service_definitions.list(cursor="ZXhhbXBsZTE", limit=20)

    while res is not None:
        # Handle items

        res = res.next()

Parameters

Parameter Type Required Description Example
cursor OptionalNullable[str] A pointer to the page of results to return. ZXhhbXBsZTE
limit Optional[int] The maximum number of items that are at returned. 20
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ListPaymentServiceDefinitionsResponse

Errors

Error Type Status Code Content Type
errors.Error400 400 application/json
errors.Error401 401 application/json
errors.Error403 403 application/json
errors.Error404 404 application/json
errors.Error405 405 application/json
errors.Error409 409 application/json
errors.HTTPValidationError 422 application/json
errors.Error425 425 application/json
errors.Error429 429 application/json
errors.Error500 500 application/json
errors.Error502 502 application/json
errors.Error504 504 application/json
errors.APIError 4XX, 5XX */*

get

Get the definition of a payment service that can be configured.

Example Usage

from gr4vy import Gr4vy
import os


with Gr4vy(
    bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:

    res = g_client.payment_service_definitions.get(payment_service_definition_id="adyen-ideal")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
payment_service_definition_id str ✔️ N/A adyen-ideal
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.PaymentServiceDefinition

Errors

Error Type Status Code Content Type
errors.Error400 400 application/json
errors.Error401 401 application/json
errors.Error403 403 application/json
errors.Error404 404 application/json
errors.Error405 405 application/json
errors.Error409 409 application/json
errors.HTTPValidationError 422 application/json
errors.Error425 425 application/json
errors.Error429 429 application/json
errors.Error500 500 application/json
errors.Error502 502 application/json
errors.Error504 504 application/json
errors.APIError 4XX, 5XX */*

session

Creates a session for a payment service that supports sessions.

Example Usage

from gr4vy import Gr4vy
import os


with Gr4vy(
    bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:

    res = g_client.payment_service_definitions.session(payment_service_definition_id="adyen-ideal", request_body={

    })

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
payment_service_definition_id str ✔️ N/A adyen-ideal
request_body Dict[str, Any] ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.CreateSession

Errors

Error Type Status Code Content Type
errors.Error400 400 application/json
errors.Error401 401 application/json
errors.Error403 403 application/json
errors.Error404 404 application/json
errors.Error405 405 application/json
errors.Error409 409 application/json
errors.HTTPValidationError 422 application/json
errors.Error425 425 application/json
errors.Error429 429 application/json
errors.Error500 500 application/json
errors.Error502 502 application/json
errors.Error504 504 application/json
errors.APIError 4XX, 5XX */*