openapi: 3.1.0
info:
  title: API Reference
  version: '1.0'
  contact: {}
  description: >-
    El API de ZRU utiliza métodos HTTP y una estructura RESTful de endpoint. 

    - La autenticación del API se realiza vía Header Authorization. 

    - Todas las peticiones se deben realizar en formato JSON, y las respuestas
    del API son en dicho formato.
servers:
  - url: https://api.zrupay.com/v1
    description: v1
paths:
  /transaction/:
    get:
      summary: Listar Transacciones
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/transaction.v1'
          headers: {}
        '401':
          description: Unauthorized
      operationId: get-transactions
      description: Devuelve todas las transacciones creadas en el entorno.
      parameters: []
      tags:
        - Transaction
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transactions = zru.transaction.list()
            print('Transactions: ', transactions.results)
            transactions.get_next_list() # Fetch next set of transactions
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            transactions = $zru->Transaction.list();
            echo('Transactions: ', transactions.results);
            transactions.get_next_list(); // Fetch next set of transactions
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            transactions = zru.transaction.list();
            console.log('Transactions: ', transactions.result);
            transactions.next; // Fetch next set of transactions
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transactions = zru.Transaction.list()
            print('Transactions: ', transactions.results)
            transactions.get_next_list() # Fetch next set of transactions
    parameters: []
    post:
      summary: Crear Transacción
      operationId: post-transaction
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transaction.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea una transacción en el entorno.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/transaction-create.v1'
            examples:
              Single product:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  products:
                    - amount: 1
                      product:
                        name: PRODUCT_NAME
                        price: 10.55
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
              Several products:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  products:
                    - amount: 1
                      product:
                        name: PRODUCT_NAME_1
                        price: 10.55
                    - amount: 3
                      product:
                        name: PRODUCT_NAME_2
                        price: 21.45
                    - amount: 1
                      product:
                        name: PRODUCT_NAME_3
                        price: 5
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
              Product from API:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  products:
                    - amount: 1
                      product_id: b027a162-b4d3-41ee-8b2f-0f37fcd7609f
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
              All product fields:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  products:
                    - amount: 1
                      product:
                        name: PRODUCT_NAME
                        price: 10.55
                        product_id: MERCHANT_PRODUCT_ID
                        description: DESCRIPTION
                        extra:
                          image: URL_PRODUCT_IMAGE
                          MERCHANT_KEY_1: MERCHANT_VALUE_1
                          MERCHANT_KEY_2: MERCHANT_VALUE_2
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
              Only authorize:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  products:
                    - amount: 1
                      product:
                        name: PRODUCT_NAME
                        price: 10.55
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
                  authorize: true
              MOTO Operation:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  products:
                    - amount: 1
                      product:
                        name: PRODUCT_NAME
                        price: 10.55
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
                  moto: true
              Including tax and shipping:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  products:
                    - amount: 1
                      product:
                        name: PRODUCT_NAME
                        price: 10.55
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
                  tax_name: TAX_NAME
                  tax_value: 21
                  shipping_name: SHIPPING_NAME
                  shipping_price: 10.25
              Including tax and shipping from API:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  products:
                    - amount: 1
                      product:
                        name: PRODUCT_NAME
                        price: 10.55
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
                  tax: b027a162-b4d3-41ee-8b2f-0f37fcd7609f
                  shipping: b027a162-b4d3-41ee-8b2f-0f37fcd7609f
              Using expired date:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  products:
                    - amount: 1
                      product:
                        name: PRODUCT_NAME
                        price: 10.55
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
                  expired_date: '2028-12-30T12:30:00+00:00'
      tags:
        - Transaction
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transaction = zru.Transaction({
                'currency': 'EUR',
                'order_id': 'MERCHANT_ORDER_ID',
                'products': [
                    {
                        'amount': 1,
                        'product': {
                            'name': 'PRODUCT_NAME',
                            'price': 10.55
                        }
                    }
                ],
                'return_url': 'https://www.merchant.com/return',
                'cancel_url': 'https://www.merchant.com/cancel',
                'notify_url': 'https://www.merchant.com/notify',
                'extra': {
                    'email': 'client@email.com',
                    'first_name': 'CLIENT_FIRST_NAME',
                    'last_name': 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1': 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2': 'MERCHANT_VALUE_2'
                }
            })
            transaction.save()
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            transaction = $zru->Transaction([
                'currency' => 'EUR',
                'order_id' => 'MERCHANT_ORDER_ID',
                'products' => [
                    [
                        'amount' => 1,
                        'product' => [
                            'name' => 'PRODUCT_NAME',
                            'price' => 10.55
                        ]
                    ]
                ],
                'return_url' => 'https =>//www.merchant.com/return',
                'cancel_url' => 'https =>//www.merchant.com/cancel',
                'notify_url' => 'https =>//www.merchant.com/notify',
                'extra' => [
                    'email' => 'client@email.com',
                    'first_name' => 'CLIENT_FIRST_NAME',
                    'last_name' => 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1' => 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2' => 'MERCHANT_VALUE_2'
                ]
            ]);
            transaction.save();
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            transaction = zru.Transaction({
                'currency': 'EUR',
                'order_id': 'MERCHANT_ORDER_ID',
                'products': [
                    {
                        'amount': 1,
                        'product': {
                            'name': 'PRODUCT_NAME',
                            'price': 10.55
                        }
                    }
                ],
                'return_url': 'https://www.merchant.com/return',
                'cancel_url': 'https://www.merchant.com/cancel',
                'notify_url': 'https://www.merchant.com/notify',
                'extra': {
                    'email': 'client@email.com',
                    'first_name': 'CLIENT_FIRST_NAME',
                    'last_name': 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1': 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2': 'MERCHANT_VALUE_2'
                }
            });
            transaction.save();
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transaction = zru.Transaction({
                'currency' => 'EUR',
                'order_id' => 'MERCHANT_ORDER_ID',
                'products' => [
                    {
                        'amount' => 1,
                        'product' => {
                            'name' => 'PRODUCT_NAME',
                            'price' => 10.55
                        }
                    }
                ],
                'return_url' => 'https://www.merchant.com/return',
                'cancel_url' => 'https://www.merchant.com/cancel',
                'notify_url' => 'https://www.merchant.com/notify',
                'extra' => {
                    'email' => 'client@email.com',
                    'first_name' => 'CLIENT_FIRST_NAME',
                    'last_name' => 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1' => 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2' => 'MERCHANT_VALUE_2'
                }
            })
            transaction.save()
  /transaction/{transaction-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: transaction-id
        in: path
        required: true
        description: Identificador de la transacción que se desea solicitar
    get:
      summary: Obtener Transacción
      tags:
        - Transaction
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transaction.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-transaction
      description: Devuelve la transacción solicitada.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transaction = zru.Transaction.get('<TRANSACTION_ID>')
            print(transaction)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            transaction = $zru->Transaction.get('<TRANSACTION_ID>');
            echo(transaction);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            transaction = zru.Transaction.get('<TRANSACTION_ID>');
            console.log(transaction);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transaction = zru.Transaction.get('<TRANSACTION_ID>')
            print(transaction)
  /subscription/:
    get:
      summary: Listar Suscripciones
      tags:
        - Subscription
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/subscription.v1'
        '401':
          description: Unauthorized
      operationId: get-subscriptions
      description: Devuelve todas las suscripciones creadas en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscriptions = zru.subscription.list()
            print('Subscriptions:', subscriptions.results)
            subscriptions.get_next_list() # Fetch next set of subscriptions
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            subscriptions = $zru->Subscription.list();
            echo('Subscriptions:', subscriptions.results);
            subscriptions.get_next_list(); // Fetch next set of subscriptions
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            subscriptions = zru.subscription.list();
            console.log('Subscriptions:', subscriptions.result);
            subscriptions.next; // Fetch next set of subscriptions
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscriptions = zru.Subscription.list()
            print('Subscriptions:', subscriptions.results)
            subscriptions.get_next_list() # Fetch next set of subscriptions
    parameters: []
    post:
      summary: Crear Suscripción
      operationId: post-subscription
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/subscription.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea una suscripción en el entorno.
      security:
        - AppKeys: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/subscription-create.v1'
            examples:
              Simple:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  plan:
                    name: PLAN_NAME
                    duration: 1
                    unit: M
                    price: 5.25
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
              With a maximum amount of payments:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  plan:
                    name: PLAN_NAME
                    duration: 1
                    unit: M
                    price: 5.25
                    total_payments: 20
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
              Plan from API:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  plan_id: bcc6be9d-468b-41a1-8b8d-b13b8853eba7
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
              All plan fields:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  plan:
                    name: PLAN_NAME
                    duration: 1
                    unit: M
                    price: 5.25
                    total_payments: 20
                    plan_id: MERCHANT_PLAN_ID
                    description: DESCRIPTION
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
              Trial period and price:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  plan:
                    name: PLAN_NAME
                    duration: 1
                    unit: M
                    price: 5.25
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
                  trial_price_1: 0
                  duration1: 3
                  unit1: M
              Using expired date:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  plan:
                    name: PLAN_NAME
                    duration: 1
                    unit: M
                    price: 5.25
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
                  expired_date: '2028-12-30T12:30:00+00:00'
      tags:
        - Subscription
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription({
                'currency': 'EUR',
                'order_id': 'MERCHANT_ORDER_ID',
                'plan': {
                    'name': 'PLAN_NAME',
                    'duration': 1,
                    'unit': 'M',
                    'price': 5.25
                },
                'return_url': 'https://www.merchant.com/return',
                'cancel_url': 'https://www.merchant.com/cancel',
                'notify_url': 'https://www.merchant.com/notify',
                'extra': {
                    'email': 'client@email.com',
                    'first_name': 'CLIENT_FIRST_NAME',
                    'last_name': 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1': 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2': 'MERCHANT_VALUE_2'
                }
            })
            subscription.save()
            print(subscription)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            subscription = $zru->Subscription([
                'currency' => 'EUR',
                'order_id' => 'MERCHANT_ORDER_ID',
                'plan' => [
                    'name' => 'PLAN_NAME',
                    'duration' => 1,
                    'unit' => 'M',
                    'price' => 5.25
                ],
                'return_url' => 'https =>//www.merchant.com/return',
                'cancel_url' => 'https =>//www.merchant.com/cancel',
                'notify_url' => 'https =>//www.merchant.com/notify',
                'extra' => [
                    'email' => 'client@email.com',
                    'first_name' => 'CLIENT_FIRST_NAME',
                    'last_name' => 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1' => 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2' => 'MERCHANT_VALUE_2'
                ]
            ]);
            subscription.save();
            echo(subscription);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            subscription = zru.subscription.create({
                'currency': 'EUR',
                'order_id': 'MERCHANT_ORDER_ID',
                'plan': {
                    'name': 'PLAN_NAME',
                    'duration': 1,
                    'unit': 'M',
                    'price': 5.25
                },
                'return_url': 'https://www.merchant.com/return',
                'cancel_url': 'https://www.merchant.com/cancel',
                'notify_url': 'https://www.merchant.com/notify',
                'extra': {
                    'email': 'client@email.com',
                    'first_name': 'CLIENT_FIRST_NAME',
                    'last_name': 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1': 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2': 'MERCHANT_VALUE_2'
                }
            });
            subscription.save();
            console.log(subscription);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription({
                'currency' => 'EUR',
                'order_id' => 'MERCHANT_ORDER_ID',
                'plan' => {
                    'name' => 'PLAN_NAME',
                    'duration' => 1,
                    'unit' => 'M',
                    'price' => 5.25
                },
                'return_url' => 'https://www.merchant.com/return',
                'cancel_url' => 'https://www.merchant.com/cancel',
                'notify_url' => 'https://www.merchant.com/notify',
                'extra' => {
                    'email' => 'client@email.com',
                    'first_name' => 'CLIENT_FIRST_NAME',
                    'last_name' => 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1' => 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2' => 'MERCHANT_VALUE_2'
                }
            })
            subscription.save()
            print(subscription)
  /subscription/{subscription-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: subscription-id
        in: path
        description: Identificador de la suscripción que se desea solicitar
        required: true
    get:
      summary: Obtener Suscripción
      tags:
        - Subscription
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/subscription.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-subscription
      description: Devuelve la suscripción solicitada.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription.get('<SUBSCRIPTION_ID>')
            print(subscription)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            subscription = $zru->Subscription.get('<SUBSCRIPTION_ID>');
            echo(subscription);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            subscription = zru.Subscription.get('<SUBSCRIPTION_ID>');
            console.log(subscription);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription.get('<SUBSCRIPTION_ID>')
            print(subscription)
  /subscription/{subscription-id}/start/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: subscription-id
        in: path
        description: Identificador de la suscripción que se desea iniciar
        required: true
    post:
      summary: Iniciar Suscripción
      tags:
        - Subscription
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/result.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: post-subscription-start
      description: Inicia la suscripción solicitada, debe estar en espera.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription({'id': '<SUBSCRIPTION_ID>'})
            print(subscription.start())
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            subscription = $zru->Subscription(['id' => '<SUBSCRIPTION_ID>']);
            echo(subscription.start());
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            subscription = zru.Subscription({'id': '<SUBSCRIPTION_ID>'});
            console.log(subscription.start());
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription({'id' => '<SUBSCRIPTION_ID>'})
            print(subscription.start())
  /subscription/{subscription-id}/pause/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: subscription-id
        in: path
        description: Identificador de la suscripción que se desea pausar
        required: true
    post:
      summary: Pausar Suscripción
      tags:
        - Subscription
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/result.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: post-subscription-pause
      description: Pausa la suscripción solicitada, debe estar activa.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription({'id': '<SUBSCRIPTION_ID>'})
            print(subscription.pause())
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            subscription = $zru->Subscription(['id' => '<SUBSCRIPTION_ID>']);
            echo(subscription.pause());
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            subscription = zru.Subscription({'id': '<SUBSCRIPTION_ID>'});
            console.log(subscription.pause());
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription({'id' => '<SUBSCRIPTION_ID>'})
            print(subscription.pause())
  /subscription/{subscription-id}/active/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: subscription-id
        in: path
        description: Identificador de la suscripción que se desea activar
        required: true
    post:
      summary: Activar Suscripción
      tags:
        - Subscription
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/result.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: post-subscription-active
      description: Activa la suscripción solicitada, debe estar en pausa.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription({'id': '<SUBSCRIPTION_ID>'})
            print(subscription.active())
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            subscription = $zru->Subscription(['id' => '<SUBSCRIPTION_ID>']);
            echo(subscription.active());
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            subscription = zru.Subscription({'id': '<SUBSCRIPTION_ID>'});
            console.log(subscription.active());
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription({'id' => '<SUBSCRIPTION_ID>'})
            print(subscription.active())
  /subscription/{subscription-id}/stop/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: subscription-id
        in: path
        description: Identificador de la suscripción que se desea parar
        required: true
    post:
      summary: Parar Suscripción
      tags:
        - Subscription
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/result.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: post-subscription-stop
      description: >-
        Para la suscripción solicitada, después de ejecutar esta acción la
        suscripción no podrá ser reactivada ni se realizarán cobros.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription({'id': '<SUBSCRIPTION_ID>'})
            print(subscription.stop())
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            subscription = $zru->Subscription(['id' => '<SUBSCRIPTION_ID>']);
            echo(subscription.stop());
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            subscription = zru.Subscription({'id': '<SUBSCRIPTION_ID>'});
            console.log(subscription.stop());
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            subscription = zru.Subscription({'id' => '<SUBSCRIPTION_ID>'})
            print(subscription.stop())
  /authorization/:
    get:
      summary: Listar Autorizaciones
      tags:
        - Authorization
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: array
                    items:
                      $ref: '#/components/schemas/authorization.v1'
        '401':
          description: Unauthorized
      operationId: get-authorizations
      description: Devuelve todas las autorizaciones creadas en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            authorizations = zru.authorization.list()
            print('Authorizations: ', authorizations.results)
            authorizations.get_next_list() # Fetch next set of authorizations
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            authorizations = $zru->Authorization.list();
            echo('Authorizations: ', authorizations.results);
            authorizations.get_next_list(); // Fetch next set of authorizations
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            authorizations = zru.authorization.list();
            console.log('Authorizations: ', authorizations.result);
            authorizations.next; // Fetch next set of authorizations
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            authorizations = zru.Authorization.list()
            print('Authorizations: ', authorizations.results)
            authorizations.get_next_list() # Fetch next set of authorizations
    post:
      summary: Crear Autorización
      operationId: post-authorization
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/authorization.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea una autorización en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            authorization = zru.Authorization({
                'currency': 'EUR',
                'order_id': 'MERCHANT_ORDER_ID',
                'return_url': 'https://www.merchant.com/return',
                'cancel_url': 'https://www.merchant.com/cancel',
                'notify_url': 'https://www.merchant.com/notify',
                'extra': {
                    'email': 'client@email.com',
                    'first_name': 'CLIENT_FIRST_NAME',
                    'last_name': 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1': 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2': 'MERCHANT_VALUE_2'
                }
            })
            authorization.save()
            print(authorization)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            authorization = $zru->Authorization([
                'currency' => 'EUR',
                'order_id' => 'MERCHANT_ORDER_ID',
                'return_url' => 'https =>//www.merchant.com/return',
                'cancel_url' => 'https =>//www.merchant.com/cancel',
                'notify_url' => 'https =>//www.merchant.com/notify',
                'extra' => [
                    'email' => 'client@email.com',
                    'first_name' => 'CLIENT_FIRST_NAME',
                    'last_name' => 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1' => 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2' => 'MERCHANT_VALUE_2'
                ]
            ]);
            authorization.save();
            echo(authorization);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            authorization = zru.authorization.create({
                'currency': 'EUR',
                'order_id': 'MERCHANT_ORDER_ID',
                'return_url': 'https://www.merchant.com/return',
                'cancel_url': 'https://www.merchant.com/cancel',
                'notify_url': 'https://www.merchant.com/notify',
                'extra': {
                    'email': 'client@email.com',
                    'first_name': 'CLIENT_FIRST_NAME',
                    'last_name': 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1': 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2': 'MERCHANT_VALUE_2'
                }
            });
            authorization.save();
            console.log(authorization);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            authorization = zru.Authorization({
                'currency' => 'EUR',
                'order_id' => 'MERCHANT_ORDER_ID',
                'return_url' => 'https://www.merchant.com/return',
                'cancel_url' => 'https://www.merchant.com/cancel',
                'notify_url' => 'https://www.merchant.com/notify',
                'extra' => {
                    'email' => 'client@email.com',
                    'first_name' => 'CLIENT_FIRST_NAME',
                    'last_name' => 'CLIENT_LAST_NAME',
                    'MERCHANT_KEY_1' => 'MERCHANT_VALUE_1',
                    'MERCHANT_KEY_2' => 'MERCHANT_VALUE_2'
                }
            })
            authorization.save()
            print(authorization)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/authorization-create.v1'
            examples:
              Simple:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
              Charging an amount:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
                  total_price: 24.55
              Authorizing an amount:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
                  total_price: 24.55
                  authorize: true
              Using expired date:
                value:
                  currency: EUR
                  order_id: MERCHANT_ORDER_ID
                  return_url: https://www.merchant.com/return
                  cancel_url: https://www.merchant.com/cancel
                  notify_url: https://www.merchant.com/notify
                  extra:
                    email: client@email.com
                    first_name: CLIENT_FIRST_NAME
                    last_name: CLIENT_LAST_NAME
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
                  expired_date: '2028-12-30T12:30:00+00:00'
        description: ''
      tags:
        - Authorization
  /authorization/{authorization-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: authorization-id
        in: path
        required: true
        description: Identificador de la autorización que se desea solicitar
    get:
      summary: Obtener Autorización
      tags:
        - Authorization
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/authorization.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-authorization
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            authorization = zru.Authorization.get('<AUTHORIZATION_ID>')
            print(authorization)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            authorization = $zru->Authorization.get('<AUTHORIZATION_ID>');
            echo(authorization);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            authorization = zru.Authorization.get('<AUTHORIZATION_ID>');
            console.log(authorization);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            authorization = zru.Authorization.get('<AUTHORIZATION_ID>')
            print(authorization)
      description: Devuelve la autorización solicitada.
  /authorization/{authorization-id}/charge/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: authorization-id
        in: path
        required: true
        description: Identificador de la autorización que se desea cobrar
    post:
      summary: Cobrar una Autorización
      operationId: post-authorization-charge
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/result.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: Realiza un cobro utilizando el método de pago autorizado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            authorization = zru.Authorization({'id': '<AUTHORIZATION_ID>'})
            print(authorization.charge({
                'amount': 21.12,
                'charge_id': 'MERCHANT_CHARGE_ID'
            }))
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            authorization = $zru->Authorization(['id' => '<AUTHORIZATION_ID>']);
            echo(authorization.charge([
                'amount' => 21.12,
                'charge_id' => 'MERCHANT_CHARGE_ID'
            ]););
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            authorization = zru.Authorization({'id': '<AUTHORIZATION_ID>'});
            console.log(authorization.charge({
                'amount': 21.12,
                'charge_id': 'MERCHANT_CHARGE_ID'
            }););
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            authorization = zru.Authorization({'id' => '<AUTHORIZATION_ID>'})
            print(authorization.charge({
                'amount' => 21.12,
                'charge_id' => 'MERCHANT_CHARGE_ID'
            }))
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/charge.v1'
            examples:
              Charge Amount:
                value:
                  amount: 21.12
                  charge_id: MERCHANT_CHARGE_ID
              Authorize amount:
                value:
                  amount: 21.12
                  charge_id: MERCHANT_CHARGE_ID
                  authorize: true
              Using extra field:
                value:
                  amount: 21.12
                  charge_id: MERCHANT_CHARGE_ID
                  extra:
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
        description: ''
      tags:
        - Authorization
  /authorization/{authorization-id}/remove/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: authorization-id
        in: path
        required: true
        description: Identificador de la autorización que se desea eliminar
    post:
      summary: Eliminar una Autorización
      operationId: post-authorization-remove
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/result.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: >-
        Elimina una autorización, después de realizar esta acción no se  podrá
        utilizar de nuevo.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            authorization = zru.Authorization.get('<AUTHORIZATION_ID>')
            print(authorization.delete())
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            authorization = $zru->Authorization.get('<AUTHORIZATION_ID>');
            echo(authorization.delete());
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            authorization = zru.Authorization.get('<AUTHORIZATION_ID>');
            console.log(authorization.delete());
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            authorization = zru.Authorization.get('<AUTHORIZATION_ID>')
            print(authorization.delete())
      tags:
        - Authorization
  /sale/:
    get:
      summary: Listar Pagos
      tags:
        - Sale
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/sale.v1'
        '401':
          description: Unauthorized
      operationId: get-sales
      description: Devuelve todos los pagos creados en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            sales = zru.sale.list()
            print('Sales:', sales.results)
            sales.get_next_list() # Fetch next set of sales
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            sales = $zru->Sale.list();
            echo('Sales:', sales.results);
            sales.get_next_list(); // Fetch next set of sales
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            sales = zru.sale.list();
            console.log('Sales:', sales.result);
            sales.next; // Fetch next set of sales
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            sales = zru.Sale.list()
            print('Sales:', sales.results)
            sales.get_next_list() # Fetch next set of sales
  /sale/{sale-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: sale-id
        in: path
        required: true
        description: Identificador del pago que se desea solicitar
    get:
      summary: Obtener Pago
      tags:
        - Sale
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sale.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-sale
      description: Devuelve el pago solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            sale = zru.Sale.get('<SALE_ID>')
            print(sale)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            sale = $zru->Sale.get('<SALE_ID>');
            echo(sale);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            sale = zru.Sale.get('<SALE_ID>');
            console.log(sale);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            sale = zru.Sale.get('<SALE_ID>')
            print(sale)
  /sale/{sale-id}/capture/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: sale-id
        in: path
        required: true
        description: Identificador del pago que se desea solicitar
    post:
      summary: Capturar Pago
      operationId: post-sale-capture
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/result.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: Captura la parte del pago en espera, total o parcialmente.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            sale = zru.Sale({'id': '<SALE_ID>'})
            print(sale.capture({}))
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            sale = $zru->Sale(['id' => '<SALE_ID>']);
            echo(sale.capture([]););
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            sale = zru.Sale({'id': '<SALE_ID>'});
            console.log(sale.capture({}););
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            sale = zru.Sale({'id' => '<SALE_ID>'})
            print(sale.capture({}))
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/amount.v1'
            examples:
              Total:
                value: {}
              Partial:
                value:
                  amount: 5.45
              Using extra field:
                value:
                  extra:
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
      tags:
        - Sale
  /sale/{sale-id}/refund/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: sale-id
        in: path
        required: true
        description: Identificador del pago que se desea solicitar
    post:
      summary: Devolver Pago
      operationId: post-sale-refund
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/result.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: Devuelve la parte del pago capturada, total o parcialmente.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            sale = zru.Sale({'id': '<SALE_ID>'})
            print(sale.refund({}))
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            sale = $zru->Sale(['id' => '<SALE_ID>']);
            echo(sale.refund([]););
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            sale = zru.Sale({'id': '<SALE_ID>'});
            console.log(sale.refund({}););
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            sale = zru.Sale({'id' => '<SALE_ID>'})
            print(sale.refund({}))
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/amount.v1'
            examples:
              Total:
                value: {}
              Partial:
                value:
                  amount: 5.45
              Using extra field:
                value:
                  extra:
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
      tags:
        - Sale
  /sale/{sale-id}/void/:
    parameters:
      - schema:
          type: string
        name: sale-id
        in: path
        required: true
        description: Identificador del pago que se desea solicitar
    post:
      summary: Liberar Pago
      operationId: post-sale-void
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/result.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: Libera la parte del pago en espera, total o parcialmente.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            sale = zru.Sale({'id': '<SALE_ID>'})
            print(sale.void())
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            sale = $zru->Sale(['id' => '<SALE_ID>']);
            echo(sale.void());
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            sale = zru.Sale({'id': '<SALE_ID>'});
            console.log(sale.void());
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            sale = zru.Sale({'id' => '<SALE_ID>'})
            print(sale.void())
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/amount.v1'
            examples:
              Total:
                value: {}
              Using extra field:
                value:
                  extra:
                    MERCHANT_KEY_1: MERCHANT_VALUE_1
                    MERCHANT_KEY_2: MERCHANT_VALUE_2
      tags:
        - Sale
  /currency/:
    get:
      summary: Listar Monedas
      tags:
        - Currency
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/currency.v1'
        '401':
          description: Unauthorized
      operationId: get-currencies
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            currencies = zru.currency.list()
            print('Currencies:', currencies.results)
            currencies.get_next_list() # Fetch next set of currencies
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            currencies = $zru->Currency.list();
            echo('Currencies:', currencies.results);
            currencies.get_next_list(); // Fetch next set of currencies
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            currencies = zru.currency.list();
            console.log('Currencies:', currencies.result);
            currencies.next; // Fetch next set of currencies
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            currencies = zru.Currency.list()
            print('Currencies:', currencies.results)
            currencies.get_next_list() # Fetch next set of currencies
      description: Devuelve todas las monedas.
  /currency/{currency-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: currency-id
        in: path
        required: true
        description: Identificador de la moneda que se desea solicitar
    get:
      summary: Obtener Moneda
      tags:
        - Currency
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/currency.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-currency
      description: Devuelve la moneda solicitada.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            currency = zru.Currency.get('<CURRENCY_ID>')
            print(currency)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            currency = $zru->Currency.get('<CURRENCY_ID>');
            echo(currency);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            currency = zru.Currency.get('<CURRENCY_ID>');
            console.log(currency);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            currency = zru.Currency.get('<CURRENCY_ID>')
            print(currency)
  /product/:
    get:
      summary: Listar Productos
      tags:
        - Product
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/product.v1'
        '401':
          description: Unauthorized
      operationId: get-products
      description: Devuelve todos los productos creados en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            products = zru.product.list()
            print(products.results)
            products.get_next_list() # Fetch next set of products
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            products = $zru->Product.list();
            echo(products.results);
            products.get_next_list(); // Fetch next set of products
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            products = zru.product.list();
            console.log(products.result);
            products.next; // Fetch next set of products
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            products = zru.Product.list()
            print(products.results)
            products.get_next_list() # Fetch next set of products
    post:
      summary: Crear Producto
      operationId: post-product
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/product.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea un producto en el entorno.
      security:
        - AppKeys: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/product-create.v1'
            examples:
              Product:
                value:
                  name: NAME
                  price: 15
                  product_id: MERCHANT_PRODUCT_ID
                  description: DESCRIPTION
                  extra:
                    MERCHANT_KEY: MERCHANT_VALUE
      tags:
        - Product
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            product = zru.Product({
                'name': 'NAME',
                'price': 15,
                'product_id': 'MERCHANT_PRODUCT_ID',
                'description': 'DESCRIPTION',
                'extra': {
                    'MERCHANT_KEY': 'MERCHANT_VALUE'
                }
            })
            product.save()
            print(product)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            product = $zru->Product([
                'name' => 'NAME',
                'price' => 15,
                'product_id' => 'MERCHANT_PRODUCT_ID',
                'description' => 'DESCRIPTION',
                'extra' => [
                    'MERCHANT_KEY' => 'MERCHANT_VALUE'
                ]
            ]);
            product.save();
            echo(product);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            product = zru.product.create({
                'name': 'NAME',
                'price': 15,
                'product_id': 'MERCHANT_PRODUCT_ID',
                'description': 'DESCRIPTION',
                'extra': {
                    'MERCHANT_KEY': 'MERCHANT_VALUE'
                }
            });
            product.save();
            console.log(product);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            product = zru.Product({
                'name' => 'NAME',
                'price' => 15,
                'product_id' => 'MERCHANT_PRODUCT_ID',
                'description' => 'DESCRIPTION',
                'extra' => {
                    'MERCHANT_KEY' => 'MERCHANT_VALUE'
                }
            })
            product.save()
            print(product)
  /product/{product-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: product-id
        in: path
        required: true
        description: Identificador del producto que se desea solicitar
    get:
      summary: Obtener Producto
      tags:
        - Product
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/product.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-product
      description: Devuelve el producto solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            product = zru.Product.get('<PRODUCT_ID>')
            print(result)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            product = $zru->Product.get('<PRODUCT_ID>');
            echo(result);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            product = zru.Product.get('<PRODUCT_ID>');
            console.log(result);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            product = zru.Product.get('<PRODUCT_ID>')
            print(result)
    patch:
      summary: Editar Producto
      operationId: patch-product
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/product.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
        - Product
      description: Edita el producto solicitado.
      security:
        - AppKeys: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/product-edit.v1'
            examples:
              Product edit:
                value:
                  price: 18
        description: ''
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            product = zru.Product.change('<PRODUCT_ID>', {'price': 18.0})
            print(product)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            product = $zru->Product.change('<PRODUCT_ID>', ['price' =>18.0]);
            echo(product);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            product = zru.Product.change('<PRODUCT_ID>', {'price': 18.0});
            console.log(product);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            product = zru.Product.change('<PRODUCT_ID>', {'price' => 18.0})
            print(product)
    delete:
      summary: Eliminar Producto
      operationId: delete-product
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: Elimina el producto solicitado.
      security:
        - AppKeys: []
      tags:
        - Product
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            product = zru.Product.get('<PRODUCT_ID>')
            product.delete()
            print(product)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            product = $zru->Product.get('<PRODUCT_ID>');
            product.delete();
            echo(product);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            product = zru.Product.get('<PRODUCT_ID>');
            product.delete();
            console.log(product);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            product = zru.Product.get('<PRODUCT_ID>')
            product.delete()
            print(product)
  /plan/:
    get:
      summary: Listar Planes
      tags:
        - Plan
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/plan.v1'
        '401':
          description: Unauthorized
      operationId: get-plans
      description: Devuelve todos los planes creados en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            plans = zru.plan.list()
            print('Plans:', plans.results)
            plans.get_next_list() # Fetch next set of plans
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            plans = $zru->Plan.list();
            echo('Plans:', plans.results);
            plans.get_next_list(); // Fetch next set of plans
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            plans = zru.plan.list();
            console.log('Plans:', plans.result);
            plans.next; // Fetch next set of plans
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            plans = zru.Plan.list()
            print('Plans:', plans.results)
            plans.get_next_list() # Fetch next set of plans
    post:
      summary: Crear Plan
      operationId: post-plan
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/plan.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea un plan en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            plan = zru.Plan({
                'name': 'NAME',
                'price': 20,
                'duration': 2,
                'unit': 'M',
                'plan_id': 'MERCHANT_PLAN_ID',
                'description': 'DESCRIPTION',
                'total_payments': 2,
                'extra': {
                    'MERCHANT_KEY': 'MERCHANT_VALUE'
                }
            })
            plan.save()
            print(plan)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            plan = $zru->Plan([
                'name' => 'NAME',
                'price' => 20,
                'duration' => 2,
                'unit' => 'M',
                'plan_id' => 'MERCHANT_PLAN_ID',
                'description' => 'DESCRIPTION',
                'total_payments' => 2,
                'extra' => [
                    'MERCHANT_KEY' => 'MERCHANT_VALUE'
                ]
            ]);
            plan.save();
            echo(plan);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            plan = zru.plan.create({
                'name': 'NAME',
                'price': 20,
                'duration': 2,
                'unit': 'M',
                'plan_id': 'MERCHANT_PLAN_ID',
                'description': 'DESCRIPTION',
                'total_payments': 2,
                'extra': {
                    'MERCHANT_KEY': 'MERCHANT_VALUE'
                }
            });
            plan.save();
            console.log(plan);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            plan = zru.Plan({
                'name' => 'NAME',
                'price' => 20,
                'duration' => 2,
                'unit' => 'M',
                'plan_id' => 'MERCHANT_PLAN_ID',
                'description' => 'DESCRIPTION',
                'total_payments' => 2,
                'extra' => {
                    'MERCHANT_KEY' => 'MERCHANT_VALUE'
                }
            })
            plan.save()
            print(plan)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/plan-create.v1'
            examples:
              Plan:
                value:
                  name: NAME
                  price: 20
                  duration: 2
                  unit: M
                  plan_id: MERCHANT_PLAN_ID
                  description: DESCRIPTION
                  total_payments: 2
                  extra:
                    MERCHANT_KEY: MERCHANT_VALUE
      tags:
        - Plan
  /plan/{plan-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: plan-id
        in: path
        required: true
        description: Identificador del plan que se desea solicitar
    get:
      summary: Obtener Plan
      tags:
        - Plan
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/plan.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-plan
      description: Devuelve el plan solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            plan = zru.Plan.get('<PLAN_ID>')
            print(plan)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            plan = $zru->Plan.get('<PLAN_ID>');
            echo(plan);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            plan = zru.Plan.get('<PLAN_ID>');
            console.log(plan);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            plan = zru.Plan.get('<PLAN_ID>')
            print(plan)
    patch:
      summary: Editar Plan
      operationId: patch-plan
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/plan.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
        - Plan
      description: Edita el plan solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            plan = zru.Plan.change('<PLAN_ID>', {'price': 150})
            print(product)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            plan = $zru->Plan.change('<PLAN_ID>', ['price' => 150]);
            echo(product);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            plan = zru.Plan.change('<PLAN_ID>', {'price': 150});
            console.log(product);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            plan = zru.Plan.change('<PLAN_ID>', {'price' => 150})
            print(product)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/plan-edit.v1'
            examples:
              Plan edit:
                value:
                  price: 150
        description: ''
    delete:
      summary: Eliminar Plan
      operationId: delete-plan
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: Elimina el plan solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            plan = zru.Plan.get('<PLAN_ID>')
            plan.delete()
            print(plan)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            plan = $zru->Plan.get('<PLAN_ID>');
            plan.delete();
            echo(plan);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            plan = zru.Plan.get('<PLAN_ID>');
            plan.delete();
            console.log(plan);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            plan = zru.Plan.get('<PLAN_ID>')
            plan.delete()
            print(plan)
      tags:
        - Plan
  /tax/:
    get:
      summary: Listar Impuestos
      tags:
        - Tax
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/tax.v1'
        '401':
          description: Unauthorized
      operationId: get-taxes
      description: Devuelve todos los impuestos creados en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            taxes = zru.tax.list()
            print('Taxes:', taxes.results)
            taxes.get_next_list() # Fetch next set of taxes
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            taxes = $zru->Tax.list();
            echo('Taxes:', taxes.results);
            taxes.get_next_list(); // Fetch next set of taxes
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            taxes = zru.tax.list();
            console.log('Taxes:', taxes.result);
            taxes.next; // Fetch next set of taxes
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            taxes = zru.Tax.list()
            print('Taxes:', taxes.results)
            taxes.get_next_list() # Fetch next set of taxes
    post:
      summary: Crear Impuesto
      operationId: post-tax
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tax.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea un impuesto en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            tax = zru.Tax({
                'name': 'TAX_NAME',
                'percent': 19
            })
            tax.save()
            print(tax)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            tax = $zru->Tax([
                'name' => 'TAX_NAME',
                'percent' => 19
            ]);
            tax.save();
            echo(tax);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            tax = zru.tax.create({
                'name': 'TAX_NAME',
                'percent': 19
            });
            tax.save();
            console.log(tax);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            tax = zru.Tax({
                'name' => 'TAX_NAME',
                'percent' => 19
            })
            tax.save()
            print(tax)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tax-create.v1'
            examples:
              Tax:
                value:
                  name: TAX_NAME
                  percent: 19
      tags:
        - Tax
  /tax/{tax-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: tax-id
        in: path
        required: true
        description: Identificador del impuesto que se desea solicitar
    get:
      summary: Obtener Impuesto
      tags:
        - Tax
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tax.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-tax
      description: Devuelve el impuesto solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            tax = zru.Tax.get('<TAX_ID>')
            print(tax)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            tax = $zru->Tax.get('<TAX_ID>');
            echo(tax);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            tax = zru.Tax.get('<TAX_ID>');
            console.log(tax);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            tax = zru.Tax.get('<TAX_ID>')
            print(tax)
    patch:
      summary: Editar Impuesto
      operationId: patch-tax
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tax.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
        - Tax
      description: Edita el impuesto solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            tax = zru.Tax.change('<TAX_ID>', {'percent': 21.0})
            print(tax)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            tax = $zru->Tax.change('<TAX_ID>', ['percent' =>21.0]);
            echo(tax);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            tax = zru.Tax.change('<TAX_ID>', {'percent': 21.0});
            console.log(tax);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            tax = zru.Tax.change('<TAX_ID>', {'percent' => 21.0})
            print(tax)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tax-edit.v1'
            examples:
              Tax edit:
                value:
                  percent: 21
        description: ''
    delete:
      summary: Eliminar Impuesto
      operationId: delete-tax
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: Elimina el impuesto solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            tax = zru.Tax.get('<TAX_ID>')
            tax.delete()
            print(tax)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            tax = $zru->Tax.get('<TAX_ID>');
            tax.delete();
            echo(tax);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            tax = zru.Tax.get('<TAX_ID>');
            tax.delete();
            console.log(tax);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            tax = zru.Tax.get('<TAX_ID>')
            tax.delete()
            print(tax)
      tags:
        - Tax
  /shipping/:
    get:
      summary: Listar Envíos
      tags:
        - Shipping
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/shipping.v1'
        '401':
          description: Unauthorized
      operationId: get-shippings
      description: Devuelve todos los envíos creados en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            shippings = zru.shipping.list()
            print('Shippings:', shippings.results)
            shippings.get_next_list() # Fetch next set of shippings
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            shippings = $zru->Shipping.list();
            echo('Shippings:', shippings.results);
            shippings.get_next_list(); // Fetch next set of shippings
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            shippings = zru.shipping.list();
            console.log('Shippings:', shippings.result);
            shippings.next; // Fetch next set of shippings
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            shippings = zru.Shipping.list()
            print('Shippings:', shippings.results)
            shippings.get_next_list() # Fetch next set of shippings
    post:
      summary: Crear Envío
      operationId: post-shipping
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shipping.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea un envío en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            shipping = zru.Shipping({
                'name': 'SHIPPING_NAME',
                'price': 100
            })
            shipping.save()
            print(shipping)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            shipping = $zru->Shipping([
                'name' => 'SHIPPING_NAME',
                'price' => 100
            ]);
            shipping.save();
            echo(shipping);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            shipping = zru.shipping.create({
                'name': 'SHIPPING_NAME',
                'price': 100
            });
            shipping.save();
            console.log(shipping);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            shipping = zru.Shipping({
                'name' => 'SHIPPING_NAME',
                'price' => 100
            })
            shipping.save()
            print(shipping)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/shipping-create.v1'
            examples:
              Shipping:
                value:
                  name: SHIPPING_NAME
                  price: 100
      tags:
        - Shipping
  /shipping/{shipping-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: shipping-id
        in: path
        required: true
        description: Identificador del envío que se desea solicitar
    get:
      summary: Obtener Envío
      tags:
        - Shipping
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shipping.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-shipping
      description: Devuelve el envío solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            shipping = zru.Shipping.get('<SHIPPING_ID>')
            print(shipping)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            shipping = $zru->Shipping.get('<SHIPPING_ID>');
            echo(shipping);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            shipping = zru.Shipping.get('<SHIPPING_ID>');
            console.log(shipping);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            shipping = zru.Shipping.get('<SHIPPING_ID>')
            print(shipping)
    patch:
      summary: Editar Envío
      operationId: patch-shipping
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shipping.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
        - Shipping
      description: Edita el envío solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            shipping = zru.Shipping.change('<SHIPPING_ID>', {'price': 50})
            print(shipping)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            shipping = $zru->Shipping.change('<SHIPPING_ID>', ['price' => 50]);
            echo(shipping);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            shipping = zru.Shipping.change('<SHIPPING_ID>', {'price': 50});
            console.log(shipping);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            shipping = zru.Shipping.change('<SHIPPING_ID>', {'price' => 50})
            print(shipping)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/shipping-edit.v1'
            examples:
              Shipping edit:
                value:
                  price: 50
        description: ''
    delete:
      summary: Eliminar Envío
      operationId: delete-shipping
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: Elimina el envío solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            shipping = zru.Shipping.get('<SHIPPING_ID>')
            shipping.delete()
            print(shipping)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            shipping = $zru->Shipping.get('<SHIPPING_ID>');
            shipping.delete();
            echo(shipping);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            shipping = zru.Shipping.get('<SHIPPING_ID>');
            shipping.delete();
            console.log(shipping);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            shipping = zru.Shipping.get('<SHIPPING_ID>')
            shipping.delete()
            print(shipping)
      tags:
        - Shipping
  /coupon/:
    get:
      summary: Listar Cupones
      tags:
        - Coupon
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/coupon.v1'
        '401':
          description: Unauthorized
      operationId: get-coupons
      description: Devuelve todos los cupones creados en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            coupons = zru.coupon.list()
            print('Coupons:', coupons.results)
            coupons.get_next_list() # Fetch next set of coupons
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            coupons = $zru->Coupon.list();
            echo('Coupons:', coupons.results);
            coupons.get_next_list(); // Fetch next set of coupons
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            coupons = zru.coupon.list();
            console.log('Coupons:', coupons.result);
            coupons.next; // Fetch next set of coupons
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            coupons = zru.Coupon.list()
            print('Coupons:', coupons.results)
            coupons.get_next_list() # Fetch next set of coupons
    post:
      summary: Crear Cupón
      operationId: post-coupon
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/coupon.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea un cupón en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            coupons = zru.Coupon({
                'name': 'COUPON_NAME',
                'coupon_type': 'P',
                'code': 'COUPON_CODE',
                'value': 17,
                'enabled': true,
                'expiration_date': '2024-05-31T23:59:59+00:00',
                'total_uses': 100
            })
            print('Coupons:', coupons.results)
            coupons.get_next_list() # Fetch next set of coupons
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            coupons = $zru->Coupon([
                'name' => 'COUPON_NAME',
                'coupon_type' => 'P',
                'code' => 'COUPON_CODE',
                'value' => 17,
                'enabled' => true,
                'expiration_date' => '2024-05-31T23 =>59 =>59+00 =>00',
                'total_uses' => 100
            ]);
            echo('Coupons =>', coupons.results);
            coupons.get_next_list(); // Fetch next set of coupons
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            coupons = zru.Coupon({
                'name': 'COUPON_NAME',
                'coupon_type': 'P',
                'code': 'COUPON_CODE',
                'value': 17,
                'enabled': true,
                'expiration_date': '2024-05-31T23:59:59+00:00',
                'total_uses': 100
            });
            console.log('Coupons:', coupons.results);
            coupons.get_next_list(); // Fetch next set of coupons
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            coupons = zru.Coupon({
                'name' => 'COUPON_NAME',
                'coupon_type' => 'P',
                'code' => 'COUPON_CODE',
                'value' => 17,
                'enabled' => true,
                'expiration_date' => '2024-05-31T23:59:59+00:00',
                'total_uses' => 100
            })
            print('Coupons:', coupons.results)
            coupons.get_next_list() # Fetch next set of coupons
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/coupon-create.v1'
            examples:
              Coupon:
                value:
                  name: COUPON_NAME
                  coupon_type: P
                  code: COUPON_CODE
                  value: 17
                  enabled: true
                  expiration_date: '2024-05-31T23:59:59+00:00'
                  total_uses: 100
      tags:
        - Coupon
  /coupon/{coupon-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: coupon-id
        in: path
        required: true
        description: Identificador del cupón que se desea solicitar
    get:
      summary: Obtener Cupón
      tags:
        - Coupon
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/coupon.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-coupon
      description: Devuelve el cupón solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            coupon = zru.Coupon.get('<PRODUCT_ID>')
            print(coupon)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            coupon = $zru->Coupon.get('<PRODUCT_ID>');
            echo(coupon);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            coupon = zru.Coupon.get('<PRODUCT_ID>');
            console.log(coupon);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            coupon = zru.coupon('id' => '<PRODUCT_ID>')
            coupon.retrieve
            print(coupon)
    patch:
      summary: Editar Cupón
      operationId: patch-coupon
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/coupon.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
        - Coupon
      description: Edita el cupón solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: >-
            from zru import ZRUClient


            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')

            coupon = zru.Coupon.change('<COUPON_ID>', {'name':
            'NEW_COUPON_NAME'})

            print(coupon)
        - lang: PHP
          source: >-
            <?php

            require_once __DIR__ . '/vendor/autoload.php';

            use ZRU\ZRUClient;


            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");

            coupon = $zru->Coupon.change('<COUPON_ID>', ['name' =>
            'NEW_COUPON_NAME']);

            echo(coupon);
        - lang: Node.js
          source: >-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');

            coupon = zru.Coupon.change('<COUPON_ID>', {'name':
            'NEW_COUPON_NAME'});

            console.log(coupon);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            coupon = zru.coupon("id" => "<COUPON_ID>")
            coupon.retrieve
            coupon.set('name', 'NEW_COUPON_NAME')
            puts coupon
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/coupon-edit.v1'
            examples:
              Coupon edit:
                value:
                  name: NEW_COUPON_NAME
        description: ''
    delete:
      summary: Eliminar Cupón
      operationId: delete-coupon
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: Elimina el cupón solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            coupon = zru.Coupon.get('<COUPON_ID>')
            coupon.delete()
            print(coupon)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            coupon = $zru->Coupon.get('<COUPON_ID>');
            coupon.delete();
            echo(coupon);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            coupon = zru.Coupon.get('<COUPON_ID>');
            coupon.delete();
            console.log(coupon);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            coupon = zru.coupon("id" => "<COUPON_ID>")
            coupon.retrieve
            coupon.delete()
            puts coupon
      tags:
        - Coupon
  /gateway/:
    get:
      summary: Listar Pasarelas de Pago
      tags:
        - Gateway
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/gateway.v1'
        '401':
          description: Unauthorized
      operationId: get-gateways
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            gateways = zru.gateway.list()
            print('Gateways:', gateways.results)
            gateways.get_next_list() # Fetch next set of gateways
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            gateways = $zru->Gateway.list();
            echo('Gateways:', gateways.results);
            gateways.get_next_list(); // Fetch next set of gateways
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            gateways = zru.gateway.list();
            console.log('Gateways:', gateways.result);
            gateways.next; // Fetch next set of gateways
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            gateways = zru.Gateway.list()
            print('Gateways:', gateways.results)
            gateways.get_next_list() # Fetch next set of gateways
      description: Devuelve todas las pasarelas de pago de el entorno.
  /gateway/{gateway-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: gateway-id
        in: path
        required: true
        description: Identificador de la pasarela de pago que se desea solicitar
    get:
      summary: Obtener Pasarela de Pago
      tags:
        - Gateway
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gateway.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-gateway
      description: Devuelve la pasarela de pago solicitada.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            gateway = zru.Gateway.get('<GATEWAY_ID>')
            print(gateway)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            gateway = $zru->Gateway.get('<GATEWAY_ID>');
            echo(gateway);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            gateway = zru.Gateway.get('<GATEWAY_ID>');
            console.log(gateway);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            gateway = zru.Gateway.get('<GATEWAY_ID>')
            print(gateway)
  /client/:
    get:
      summary: Listar Clientes
      tags:
        - Client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/client.v1'
        '401':
          description: Unauthorized
      operationId: get-clients
      description: Devuelve todos los clientes creados en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            clients = zru.client.list()
            print(clients.results)
            clients.get_next_list() # Fetch next set of clients
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            clients = $zru->Client.list();
            echo(clients.results);
            clients.get_next_list(); // Fetch next set of clients
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            clients = zru.client.list();
            console.log(clients.result);
            clients.next; // Fetch next set of clients
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            clients = zru.Client.list()
            print(clients.results)
            clients.get_next_list() # Fetch next set of clients
    post:
      summary: Crear Cliente
      operationId: post-client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/client.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea un cliente en el entorno.
      security:
        - AppKeys: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/client-create.v1'
            examples:
              Client:
                value:
                  name: CLIENT_NAME
                  id_country: ES
                  id_number: 24968842L
      tags:
        - Client
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            client = zru.Client({
                'id_country': 'ES',
                'id_number': '24968842L',
                'name': 'CLIENT_NAME'
            })
            client.save()
            print(client)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            client = $zru->Client([
                'id_country' => 'ES',
                'id_number' => '24968842L',
                'name' => 'CLIENT_NAME'
            ]);
            client.save();
            echo(client);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            client = zru.client.create({
                'id_country': 'ES',
                'id_number': '24968842L',
                'name': 'CLIENT_NAME'
            });
            client.save();
            console.log(client);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            client = zru.Client({
                'id_country' => 'ES',
                'id_number' => '24968842L',
                'name' => 'CLIENT_NAME'
            })
            client.save()
            print(client)
  /client/{client-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: client-id
        in: path
        required: true
        description: Identificador del cliente que se desea solicitar
    get:
      summary: Obtener Cliente
      tags:
        - Client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/client.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-client
      description: Devuelve el cliente solicitado.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            client = zru.client.get('<CLIENT_ID>')
            print(client)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            client = $zru->client.get('<CLIENT_ID>');
            echo(client);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            client = zru.client.get('<CLIENT_ID>');
            console.log(client);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            client = zru.client.get('<CLIENT_ID>')
            print(client)
    patch:
      summary: Editar Cliente
      operationId: patch-client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/client.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
        - Client
      description: Edita el cliente solicitado.
      security:
        - AppKeys: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/client-edit.v1'
            examples:
              Client edit:
                value:
                  id_number: '1234'
        description: ''
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            client = zru.Client.change('<CLIENT_ID>', {'id_number': '1234'})
            print(client)
        - lang: PHP
          source: >-
            <?php

            require_once __DIR__ . '/vendor/autoload.php';

            use ZRU\ZRUClient;


            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");

            client = $zru->Client.change('<CLIENT_ID>', ['id_number' =>
            '1234']);

            echo(client);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            client = zru.Client.change('<CLIENT_ID>', {'id_number': '1234'});
            console.log(client);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            client = zru.Client.change('<CLIENT_ID>', {'id_number' => '1234'})
            print(client)
  /client/{client-id}/iban/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: client-id
        in: path
        required: true
        description: Identificador del cliente que se desea solicitar
    get:
      summary: Listar IBANs del Cliente
      tags:
        - Client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/iban.v1'
        '401':
          description: Unauthorized
      operationId: get-client-ibans
      description: Devuelve todos los IBANs del Cliente creados en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            client_ibans = zru.Client.ibans('<CLIENT_ID>')
            print('Client IBANS:', client_ibans)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            client_ibans = $zru->Client.ibans('<CLIENT_ID>');
            echo('Client IBANS:', client_ibans);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            client_ibans = zru.Client.ibans('<CLIENT_ID>');
            console.log('Client IBANS:', client_ibans);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            client_ibans = zru.Client.ibans('<CLIENT_ID>')
            print('Client IBANS:', client_ibans)
    post:
      summary: Crear IBAN del Cliente
      operationId: post-client-iban
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/iban.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea un IBAN del Cliente en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            result = zru.Client.create_iban('<CLIENT_ID>', {
                'iban': 'ES91 2100 0418 4502 0005 1332',
                'iban_id': 'MERCHANT_IBAN_ID'
            })
            print(result)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            result = $zru->Client.create_iban('<CLIENT_ID>', [
                'iban' => 'ES91 2100 0418 4502 0005 1332',
                'iban_id' => 'MERCHANT_IBAN_ID'
            ]);
            echo(result);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            result = zru.Client.create_iban('<CLIENT_ID>', {
                'iban': 'ES91 2100 0418 4502 0005 1332',
                'iban_id': 'MERCHANT_IBAN_ID'
            });
            console.log(result);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            result = zru.Client.create_iban('<CLIENT_ID>', {
                'iban' => 'ES91 2100 0418 4502 0005 1332',
                'iban_id' => 'MERCHANT_IBAN_ID'
            })
            print(result)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/iban-create.v1'
            examples:
              Iban:
                value:
                  iban_id: MERCHANT_IBAN_ID
                  iban: ES91 2100 0418 4502 0005 1332
      tags:
        - Client
  /client/{client-id}/iban/{iban-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: client-id
        in: path
        required: true
        description: Identificador del cliente que se desea solicitar
      - schema:
          type: string
          format: uuid
        name: iban-id
        in: path
        required: true
        description: Identificador del IBAN que se desea solicitar
    get:
      summary: Obtener IBAN del Cliente
      tags:
        - Client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/iban.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-client-iban
      description: Devuelve el IBAN solicitado del Cliente.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            result = zru.Client.get_iban('<CLIENT_ID>', '<CLIENT_IBAN_ID>')
            print(result)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            result = $zru->Client.get_iban('<CLIENT_ID>', '<CLIENT_IBAN_ID>');
            echo(result);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            result = zru.Client.get_iban('<CLIENT_ID>', '<CLIENT_IBAN_ID>');
            console.log(result);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            result = zru.Client.get_iban('<CLIENT_ID>', '<CLIENT_IBAN_ID>')
            print(result)
    patch:
      summary: Editar IBAN del Cliente
      operationId: patch-client-iban
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/iban.v1'
      tags:
        - Client
      description: Editar el IBAN solicitado del Cliente.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/iban-edit.v1'
            examples:
              Iban edit:
                value:
                  iban_id: '2432876'
  /client/{client-id}/document/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: client-id
        in: path
        required: true
        description: Identificador del cliente que se desea solicitar
    get:
      summary: Listar Documentos del Cliente
      tags:
        - Client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/document.v1'
        '401':
          description: Unauthorized
      operationId: get-client-documents
      description: Devuelve todos los Documentos del Cliente creados en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            client_documents = zru.Client.documents('<CLIENT_ID>')
            print('Client Documents:', client_documents)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            client_documents = $zru->Client.documents('<CLIENT_ID>');
            echo('Client Documents:', client_documents);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            client_documents = zru.Client.documents('<CLIENT_ID>');
            console.log('Client Documents:', client_documents);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            client_documents = zru.Client.documents('<CLIENT_ID>')
            print('Client Documents:', client_documents)
    post:
      summary: Crear Documento del Cliente
      operationId: post-client-document
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/document.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea un Documento del Cliente en el entorno.
      security:
        - AppKeys: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/document-create.v1'
            examples:
              test:
                value:
                  file: <file>
                  type: identification
      tags:
        - Client
  /client/{client-id}/document/{document-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: client-id
        in: path
        required: true
        description: Identificador del cliente que se desea solicitar
      - schema:
          type: string
          format: uuid
        name: document-id
        in: path
        required: true
        description: Identificador del Documento que se desea solicitar
    get:
      summary: Obtener Documento del Cliente
      tags:
        - Client
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/document.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-client-document
      description: Devuelve el Documento solicitado del Cliente.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: >-
            from zru import ZRUClient


            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')

            result = zru.Client.get_document('<CLIENT_ID>',
            '<CLIENT_DOCUMENT_ID>')

            print(result)
        - lang: PHP
          source: >-
            <?php

            require_once __DIR__ . '/vendor/autoload.php';

            use ZRU\ZRUClient;


            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");

            result = $zru->Client.get_document('<CLIENT_ID>',
            '<CLIENT_DOCUMENT_ID>');

            echo(result);
        - lang: Node.js
          source: >-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');

            result = zru.Client.get_document('<CLIENT_DOCUMENT_ID>',
            '<CLIENT_DOCUMENT_ID>');

            console.log(result);
        - lang: Ruby
          source: >-
            require 'zru'


            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')


            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')

            result = zru.Client.get_document('<CLIENT_ID>',
            '<CLIENT_DOCUMENT_ID>')

            print(result)
  /wallet/:
    get:
      summary: Listar Cuentas de Pago
      tags:
        - Wallet
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/wallet.v1'
        '401':
          description: Unauthorized
      operationId: get-wallets
      description: Devuelve todos las cuentas de pago creadas en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            wallets = zru.wallet.list()
            print('Wallets:', wallets.results)
            wallets.get_next_list() # Fetch next set of wallets
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            wallets = $zru->Wallet.list();
            echo('Wallets:', wallets.results);
            wallets.get_next_list(); // Fetch next set of wallets
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            wallets = zru.wallet.list();
            console.log('Wallets:', wallets.result);
            wallets.next; // Fetch next set of wallets
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            wallets = zru.Wallet.list()
            print('Wallets:', wallets.results)
            wallets.get_next_list() # Fetch next set of wallets
    post:
      summary: Crear Cuenta de Pago
      operationId: post-wallet
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/wallet.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea una cuenta de pago en el entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            wallet = zru.Wallet({
                'wallet_id': 'MERCHANT_WALLET_ID',
                'name': 'WALLET_NAME',
                'client_id': '<CLIENT_ID>',
                'currency': 'EUR',
                'enabled': True
            })
            print(wallet)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            wallet = $zru->Wallet([
                'wallet_id' => 'MERCHANT_WALLET_ID',
                'name' => 'WALLET_NAME',
                'client_id' => '<CLIENT_ID>',
                'currency' => 'EUR',
                'enabled' => True
            ]);
            echo(wallet);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            wallet = zru.Wallet({
                'wallet_id': 'MERCHANT_WALLET_ID',
                'name': 'WALLET_NAME',
                'client_id': '<CLIENT_ID>',
                'currency': 'EUR',
                'enabled': True
            });
            console.log(wallet);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            wallet = zru.Wallet({
                'wallet_id' => 'MERCHANT_WALLET_ID',
                'name' => 'WALLET_NAME',
                'client_id' => '<CLIENT_ID>',
                'currency' => 'EUR',
                'enabled' => True
            })
            print(wallet)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/wallet-create.v1'
            examples:
              Wallet:
                value:
                  wallet_id: MERCHANT_WALLET_ID
                  name: WALLET_NAME
                  client_id: <CLIENT_ID>
                  currency: EUR
                  enabled: true
      tags:
        - Wallet
  /wallet/{wallet-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: wallet-id
        in: path
        required: true
        description: Identificador de la cuenta de pago que se desea solicitar
    get:
      summary: Obtener Cuenta de Pago
      tags:
        - Wallet
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/wallet.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-wallet
      description: Devuelve la cuenta de pago solicitada.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            wallet = zru.Wallet.get('<WALLET_ID>')
            print(wallet)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            wallet = $zru->Wallet.get('<WALLET_ID>');
            echo(wallet);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            wallet = zru.Wallet.get('<WALLET_ID>');
            console.log(wallet);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            wallet = zru.Wallet.get('<WALLET_ID>')
            print(wallet)
    patch:
      summary: Editar Cuenta de Pago
      operationId: patch-wallet
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/wallet.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
        - Wallet
      description: Edita la cuenta de pago solicitada.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: >-
            from zru import ZRUClient


            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')

            wallet = zru.Wallet.change('<WALLET_ID>', {'name':
            'NEW_WALLET_NAME'})

            print(wallet)
        - lang: PHP
          source: >-
            <?php

            require_once __DIR__ . '/vendor/autoload.php';

            use ZRU\ZRUClient;


            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");

            wallet = $zru->Wallet.change('<WALLET_ID>', ['name':
            'NEW_WALLET_NAME']);

            echo(wallet);
        - lang: Node.js
          source: >-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');

            wallet = zru.Wallet.change('<WALLET_ID>', {'name':
            'NEW_WALLET_NAME'});

            console.log(wallet);
        - lang: Ruby
          source: >-
            require 'zru'


            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')


            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')

            wallet = zru.Wallet.change('<WALLET_ID>', {'name' =>
            'NEW_WALLET_NAME'})

            print(wallet)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/wallet-edit.v1'
            examples:
              Wallet edit:
                value:
                  name: NEW_WALLET_NAME
        description: ''
  /wallet/{wallet-id}/entry/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: wallet-id
        in: path
        required: true
        description: Identificador de la cuenta de pago que se desea solicitar
    get:
      summary: Listar Movimientos de la Cuenta de Pago
      tags:
        - Wallet
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/entry.v1'
        '401':
          description: Unauthorized
      operationId: get-wallet-entries
      description: >-
        Devuelve todos los movimientos de la cuentas de pago existentes en el
        entorno.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: // Example placeholder. Add implementation for Python.
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            // Example placeholder. Add implementation for Python.
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            // Example placeholder. Add implementation for Python.
        - lang: Ruby
          source: // Example placeholder. Add implementation for Python.
  /wallet/{wallet-id}/entry/{entry-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: wallet-id
        in: path
        required: true
        description: Identificador de la cuenta de pago que se desea solicitar
      - schema:
          type: string
          format: uuid
        name: entry-id
        in: path
        required: true
        description: Identificador del movimiento que se desea solicitar
    get:
      summary: Obtener Movimiento de la Cuenta de Pago
      tags:
        - Wallet
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/entry.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-wallet-entry
      description: Devuelve el movimiento solicitado de la cuenta de pago.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: // Example placeholder. Add implementation for Python.
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            // Example placeholder. Add implementation for Python.
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            // Example placeholder. Add implementation for Python.
        - lang: Ruby
          source: // Example placeholder. Add implementation for Python.
  /transfer/:
    get:
      summary: Listar Transferencias
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/base-paginator.v1'
                  - type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/transfer.v1'
          headers: {}
        '401':
          description: Unauthorized
      operationId: get-transfers
      description: Devuelve todas las transferencias creadas en el entorno.
      parameters: []
      tags:
        - Transfer
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transfers = zru.transfer.list()
            print('Transfers:', transfers.results)
            transfers.get_next_list() # Fetch next set of transfers
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            transfers = $zru->Transfer.list();
            echo('Transfers:', transfers.results);
            transfers.get_next_list(); // Fetch next set of transfers
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            transfers = zru.transfer.list();
            console.log('Transfers:', transfers.result);
            transfers.next; // Fetch next set of transfers
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transfers = zru.Transfer.list()
            print('Transfers:', transfers.results)
            transfers.get_next_list() # Fetch next set of transfers
    parameters: []
    post:
      summary: Crear Transferencia
      operationId: post-transfer
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transfer.v1'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      description: Crea una transferencia en el entorno.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/transfer-create.v1'
            examples:
              Transfer:
                value:
                  wallet_id: <WALLET_ID>
                  amount: 1500.75
                  concept: TRANSFER_CONCEPT
                  to_wallet_id: <TO_WALLET_ID>
                  iban_id: <IBAN_ID>
      tags:
        - Transfer
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transfer = zru.Transfer({
                'wallet_id': '<WALLET_ID>',
                'amount': 1500.75,
                'concept': 'TRANSFER_CONCEPT',
                'to_wallet_id': '<TO_WALLET_ID>',
                'iban_id': '<IBAN_ID>',
            })
            transfer.save()
            print(transfer)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            transfer = $zru->Transfer([
                'wallet_id' => '<WALLET_ID>',
                'amount' => 1500.75,
                'concept' => 'TRANSFER_CONCEPT',
                'to_wallet_id' => '<TO_WALLET_ID>',
                'iban_id' => '<IBAN_ID>',
            ]);
            transfer.save();
            echo(transfer);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            transfer = zru.transfer.create({
                'wallet_id': '<WALLET_ID>',
                'amount': 1500.75,
                'concept': 'TRANSFER_CONCEPT',
                'to_wallet_id': '<TO_WALLET_ID>',
                'iban_id': '<IBAN_ID>',
            });
            transfer.save();
            console.log(transfer);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transfer = zru.Transfer({
                'wallet_id' => '<WALLET_ID>',
                'amount' => 1500.75,
                'concept' => 'TRANSFER_CONCEPT',
                'to_wallet_id' => '<TO_WALLET_ID>',
                'iban_id' => '<IBAN_ID>',
            })
            transfer.save()
            print(transfer)
  /transfer/{transfer-id}/:
    parameters:
      - schema:
          type: string
          format: uuid
        name: transfer-id
        in: path
        required: true
        description: Identificador de la transferencia que se desea solicitar
    get:
      summary: Obtener Transferencia
      tags:
        - Transfer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transfer.v1'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: get-transfer
      description: Devuelve la transferencia solicitada.
      security:
        - AppKeys: []
      x-codeSamples:
        - lang: Python
          source: |-
            from zru import ZRUClient

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transfer = zru.Transfer.get('<TRANSFER_ID>')
            print(transfer)
        - lang: PHP
          source: |-
            <?php
            require_once __DIR__ . '/vendor/autoload.php';
            use ZRU\ZRUClient;

            $zru = new ZRUClient("PUBLIC_KEY", "SECRET_KEY");
            transfer = $zru->Transfer.get('<TRANSFER_ID>');
            echo(transfer);
        - lang: Node.js
          source: |-
            const zru = require('zru')('PUBLIC_KEY', 'SECRET_KEY');
            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY');
            transfer = zru.Transfer.get('<TRANSFER_ID>');
            console.log(transfer);
        - lang: Ruby
          source: |-
            require 'zru'

            zru = ZRU::ZRUClient.new('PUBLIC_KEY', 'SECRET_KEY')

            zru = ZRUClient('PUBLIC_KEY', 'SECRET_KEY')
            transfer = zru.Transfer.get('<TRANSFER_ID>')
            print(transfer)
components:
  schemas:
    base-paginator.v1:
      title: Paginador
      type: object
      description: Representa un paginador.
      properties:
        count:
          type: number
          description: Cantidad de elementos
        items_per_page:
          type: number
          description: Cantidad de elementos por página
        next:
          type:
            - string
            - 'null'
          description: URL a próxima página
        previous:
          type:
            - string
            - 'null'
          description: URL a página anterior
    base.v1:
      title: Base
      x-tags:
        - payments
      description: ''
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Identificador único
        token:
          type: string
          description: >-
            Token de transacción. Se utiliza para representar la transacción de
            cara al usuario
        status:
          type: string
          enum:
            - 'N'
            - C
            - D
            - E
          description: >-
            Estado de la transacción (N - Pendiente, C - Cancelada, D -
            Completada, E - Expirada)
        items_price:
          type: number
          format: float
          description: Precio total de todos los productos
        total_price:
          type: number
          format: float
          description: Precio a pagar
    base-simple-create.v1:
      title: Base Simple Parcial
      type: object
      x-tags:
        - payments
      description: ''
      properties:
        order_id:
          type: string
          description: Identificador externo
        currency:
          type: string
          maxLength: 3
          description: Moneda en formato ISO
          minLength: 3
        note:
          type: string
          description: Nota
        extra:
          type: string
          description: Valores extra en formato JSON
      required:
        - currency
    base-create.v1:
      title: Base Parcial
      x-tags:
        - payments
      description: ''
      allOf:
        - $ref: '#/components/schemas/base-simple-create.v1'
        - type: object
          properties:
            return_url:
              type: string
              format: uri
              description: >-
                URL de retorno. Se envía al cliente a esta url después de
                realizar el pago correctamente
            cancel_url:
              type: string
              format: uri
              description: >-
                URL de cancelación. Se envía al cliente a esta url si cancela el
                pago
            notify_url:
              type: string
              format: uri
              description: >-
                URL de notificación. Se envían a esta url las notificaciones de
                cambio de estado
            gateway_selected:
              type: boolean
              description: >-
                Si cuando el cliente abra la pantalla de pago la primera opción
                debe estar seleccionada
            language:
              type: string
              description: Idioma de la pantalla de pago
              enum:
                - au
                - es
                - en
                - fr
            expired_date:
              type: string
              format: date-time
              pattern: YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]
              description: >-
                Fecha de expiración (por defecto, es una semana después de la
                creación)
    product-create.v1:
      title: Producto Creación
      type: object
      description: Representa el modelo de datos para crear un producto.
      x-tags:
        - transactions
      properties:
        product_id:
          type: string
          description: Identificador externo
        name:
          type: string
          description: Nombre
        price:
          type: number
          format: float
          description: Precio
        description:
          type: string
          description: Descripción
      required:
        - name
        - price
    item-product.v1:
      title: Elemento de producto
      type: object
      description: >-
        Representa la cantidad de cada producto. Al utilizarlo en la creación se
        debe enviar `product_id` o `product`, nunca ambos y al menos uno de
        ellos.
      x-tags:
        - transactions
      properties:
        amount:
          type: number
          description: Cantidad del producto
          minimum: 1
        product_id:
          type: string
          format: uuid
          description: >-
            Identificador del producto existente en el API (requerido si no se
            envía el parámetro product)
        product:
          $ref: '#/components/schemas/product-create.v1'
      required:
        - amount
    source-item.v1:
      title: Elemento de Origen
      type: object
      properties:
        amount:
          type: number
          description: Cantidad
          format: float
        wallet_id:
          type: string
          format: uri
          description: Identificador de Cuenta de Pago
        authorization_id:
          type: string
          format: uuid
          description: Identificador de Autorización
      required:
        - amount
    source.v1:
      title: Origen
      type:
        - array
        - 'null'
      items:
        $ref: '#/components/schemas/source-item.v1'
      description: Origen de los fondos
    destination-item.v1:
      title: Elemento de Destino
      type: object
      properties:
        amount:
          type: number
          description: Cantidad
          format: float
        wallet_id:
          type: string
          format: uri
          description: Identificador de Cuenta de Pago
      required:
        - amount
        - wallet_id
    destination.v1:
      title: Destino
      type:
        - array
        - 'null'
      items:
        $ref: '#/components/schemas/destination-item.v1'
      description: Destino de los fondos
    transaction-create.v1:
      title: Transacción Creación
      x-tags:
        - payments
      description: Representa el modelo de datos para crear una transacción.
      allOf:
        - $ref: '#/components/schemas/base-create.v1'
        - type: object
          properties:
            products:
              type: array
              minItems: 1
              description: Lista de elementos de producto
              items:
                $ref: '#/components/schemas/item-product.v1'
            tax_value:
              type: number
              format: float
              description: Cantidad a pagar relacionada con el impuesto
            tax_name:
              type: string
              description: Nombre del impuesto incluido en la transacción
            tax:
              type: string
              format: uuid
              description: 'Identificador de impuesto existente en el API '
            shipping_value:
              type: number
              description: Cantidad a pagar relacionada con el envío
              format: float
            shipping_name:
              type: string
              description: Nombre del envío incluido en la transacción
            shipping:
              type: string
              format: uuid
              description: 'Identificador de envío existente en el API '
            coupon_value:
              type: number
              format: float
              description: Cantidad a descontar relacionada con el cupón
            coupon_name:
              type: string
              description: Nombre del cupón incluido en la transacción
            coupon:
              type: string
              format: uuid
              description: Identificador de cupón existente en el API
            authorize:
              type: boolean
              description: 'Si se hace una retención o no (por defecto: false)'
            source:
              $ref: '#/components/schemas/source.v1'
            destination:
              $ref: '#/components/schemas/destination.v1'
          required:
            - products
    transaction.v1:
      title: Transacción
      x-tags:
        - payments
      description: Representa un transacción.
      allOf:
        - $ref: '#/components/schemas/base.v1'
        - $ref: '#/components/schemas/transaction-create.v1'
    plan-create.v1:
      title: Plan Creación
      type: object
      description: Representa el modelo de datos para crear un plan.
      properties:
        plan_id:
          type: string
          description: Identificador externo
        name:
          type: string
          description: Nombre
        price:
          type: number
          format: float
          description: Precio
        description:
          type: string
          description: Descripción
        duration:
          type: integer
          description: Duración
        unit:
          type: string
          description: >-
            Unidad de tiempo de la duración (opciones: D - Día, M - Mes, Y -
            Año)
          enum:
            - D
            - M
            - 'Y'
        recurring:
          type: boolean
          description: 'Si es un plan recurrente o no (por defecto: True)'
      required:
        - name
        - price
        - duration
        - unit
    subscription-create.v1:
      title: Suscripción Creación
      description: >-
        Representa el modelo de datos para crear una suscripción. Al utilizarlo
        en la creación se debe enviar `plan_id` o `plan`, nunca ambos y al menos
        uno de ellos.
      allOf:
        - $ref: '#/components/schemas/base-create.v1'
        - type: object
          description: >-
            Identificador del plan al que se suscribe el usuario existente en el
            API (requerido si no se envía el parámetro plan)
          properties:
            plan_id:
              type: string
              format: uuid
              description: >-
                Identificador del plan al que se suscribe al usuario existente
                en el API (requerido si no se envía el parámetro plan)
            plan:
              $ref: '#/components/schemas/plan-create.v1'
            trial_price1:
              type: number
              format: float
              description: >-
                Precio a pagar en un primer periodo de prueba (si se envía se
                deben enviar también los parámetros duration1 y unit1)
            duration1:
              type: integer
              description: Duración de primer periodo de prueba
            unit1:
              type: string
              enum:
                - D
                - M
                - 'Y'
              description: >-
                Unidad de tiempo del primer periodo de prueba (opciones: D -
                Día, M - Mes, Y - Año)
            source:
              $ref: '#/components/schemas/source.v1'
            destination:
              $ref: '#/components/schemas/destination.v1'
    subscription.v1:
      allOf:
        - $ref: '#/components/schemas/base.v1'
        - $ref: '#/components/schemas/subscription-create.v1'
      title: Suscripción
      description: Representa una suscripción.
    result.v1:
      title: Resultado
      type: object
      description: Representa el resultado de una operación.
      properties:
        success:
          type: boolean
          description: Resultado de la operación
        response:
          type: string
          description: Mensaje de error en caso de fallo
    authorization.v1:
      title: Autorización
      description: Representa una autorización.
      allOf:
        - $ref: '#/components/schemas/base.v1'
        - $ref: '#/components/schemas/base-create.v1'
    authorization-create.v1:
      title: Autorización Creación
      description: Representa el modelo de datos para crear una autorización.
      allOf:
        - $ref: '#/components/schemas/base-create.v1'
        - type: object
          x-stoplight:
            id: icga9bthzlt89
          properties:
            total_price:
              type: number
              x-stoplight:
                id: 21bfep21cpxhn
              description: 'Cantidad a cobrar al autorizar (opcional, por defecto: 0)'
            authorize:
              type: boolean
              x-stoplight:
                id: 3foupfu9ntops
              default: false
              description: 'Si se hace una retención o no (por defecto: false)'
    amount.v1:
      title: Cantidad
      type: object
      description: Representa una cantidad
      properties:
        amount:
          type: number
          format: float
          description: Cantidad (en el caso de que no se envie se asume el total)
        extra:
          type: string
          description: Valores extras en formato JSON
        destination:
          $ref: '#/components/schemas/destination.v1'
      required:
        - amount
    charge.v1:
      title: Cobro
      description: Representa un cobro.
      allOf:
        - $ref: '#/components/schemas/amount.v1'
        - type: object
          properties:
            charge_id:
              type: string
              description: Identificador externo
            authorize:
              type: boolean
              description: 'Si se hace una retención o no (por defecto: false)'
            destination:
              $ref: '#/components/schemas/destination.v1'
    sale.v1:
      title: Pago
      type: object
      description: Representa un pago.
      properties:
        id:
          type: string
          format: uuid
          description: Identificador único
        transaction_id:
          type: string
          format: uuid
          description: Identificador de la transacción a la que pertenece
        amount:
          type: number
          format: float
          description: Valor total del pago
        amount_capture:
          type: number
          description: Cantidad del valor total del pago que esta capturada
          format: float
        hold:
          type: boolean
          description: Si el pago está en espera
        partial_hold:
          type: boolean
          description: Si el pago está parcialmente en espera
        hold_amount:
          type: number
          format: float
          description: Cantidad del valor total del pago en espera
        refund:
          type: boolean
          description: Si el pago ha sido devuelto
        partial_refund:
          type: boolean
          description: Si el pago ha sido parcialmente devuelto
        refund_amount:
          type: number
          description: Cantidad del valor total del pago devuelto
          format: float
        payment_masked:
          type: string
          description: >-
            Texto que representa el método de pago utilizado (ejemplo: en el
            caso de tarjeta los últimos cuatro dígitos)
        created_date:
          type: string
          format: date
          description: Fecha de creación del pago
          pattern: YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]
        source:
          $ref: '#/components/schemas/source.v1'
        destination:
          $ref: '#/components/schemas/destination.v1'
    currency.v1:
      title: Moneda
      type: object
      x-tags:
        - data
      description: Representa una moneda.
      x-examples: {}
      properties:
        id:
          type: string
          description: Identificador único
          format: uuid
        name:
          type: string
          description: Nombre
        code:
          type: string
          maxLength: 3
          example: EUR
          description: Código ISO de moneda
          minLength: 3
    product.v1:
      title: Producto
      description: Representa un producto, es utilizado en las transacciones.
      x-tags:
        - transactions
      allOf:
        - type: object
          properties:
            id:
              type: string
              format: uuid
              description: Identificador único
        - $ref: '#/components/schemas/product-create.v1'
    product-edit.v1:
      title: Producto Edición
      type: object
      description: Representa el modelo de datos para editar un producto.
      x-tags:
        - transactions
      properties:
        product_id:
          type: string
          description: Identificador externo
        name:
          type: string
          description: Nombre
        price:
          type: number
          format: float
          description: Precio
        description:
          type: string
          description: Descripción
    plan.v1:
      title: Plan
      description: Representa un plan, es utilizado en las suscripciones.
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: Identificador único
              format: uuid
            display_unit:
              type: string
              description: Unidad de tiempo para mostrar
        - $ref: '#/components/schemas/plan-create.v1'
    plan-edit.v1:
      title: Plan Edición
      type: object
      description: Representa el modelo de datos para editar un plan.
      properties:
        plan_id:
          type: string
          description: Identificador externo
        name:
          type: string
          description: Nombre
        price:
          type: number
          format: float
          description: Precio
        description:
          type: string
          description: Descripción
        duration:
          type: integer
          description: Duración
        unit:
          type: string
          description: >-
            Unidad de tiempo de la duración (opciones: D - Día, M - Mes, Y -
            Año)
          enum:
            - D
            - M
            - 'Y'
        recurring:
          type: boolean
          description: 'Si es un plan recurrente o no (por defecto: True)'
    tax-create.v1:
      title: Impuesto Creación
      type: object
      description: Representa el modelo de datos para crear un impuesto.
      properties:
        name:
          type: string
          description: Nombre
        percent:
          type: number
          description: Por ciento
          format: float
      required:
        - name
        - percent
    tax.v1:
      title: Impuesto
      description: Representa un impuesto, es utilizado en las transacciones.
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: Identificador único
              format: uuid
        - $ref: '#/components/schemas/tax-create.v1'
    tax-edit.v1:
      title: Impuesto Edición
      type: object
      description: Representa el modelo de datos para editar un impuesto.
      properties:
        name:
          type: string
          description: Nombre
        percent:
          type: number
          description: Por ciento
          format: float
    shipping-create.v1:
      title: Envío Creación
      type: object
      description: Representa el modelo de datos para crear un envío.
      properties:
        name:
          type: string
          description: Nombre
        price:
          type: number
          description: Precio
          format: float
      required:
        - name
        - price
    shipping.v1:
      title: Envío
      description: Representa un envío, es utilizado en las transacciones.
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: Identificador único
              format: uuid
        - $ref: '#/components/schemas/shipping-create.v1'
    shipping-edit.v1:
      title: Envío Edición
      type: object
      description: Representa el modelo de datos para editar un envío.
      properties:
        name:
          type: string
          description: Nombre
        price:
          type: number
          description: Precio
          format: float
    coupon-create.v1:
      title: Cupón Creación
      type: object
      description: Representa el modelo de datos para crear un cupón.
      properties:
        coupon_id:
          type: string
          description: Identificador externo
        name:
          type: string
          description: Nombre
        coupon_type:
          type: string
          description: 'Tipo (opciones: A - Cantidad, P - Por ciento)'
          enum:
            - A
            - P
        code:
          type: string
          description: Código para utilizar el cupón
        value:
          type: number
          format: float
          description: >-
            Valor que se utilizará para disminuir el precio total del pedido. En
            caso de que sea un cupón de tipo cantidad, lo dismuirá justo en ese
            valor; y si es de tipo por ciento, lo disminuirá en en ese valor de
            manera porcentual.
        enabled:
          type: boolean
          description: 'Si está habilitado o no (por defecto: True)'
        expiration_date:
          type: string
          format: date-time
          pattern: YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]
          description: >-
            Fecha de expiración con el formato, en caso de no existir nunca
            expirará
        total_uses:
          type: integer
          description: >-
            La cantidad total de veces que se puede utilizar el cupón, en caso
            de no existir se puede utilizar indefinidamente
          minimum: 1
      required:
        - name
        - coupon_type
        - code
        - value
    coupon.v1:
      title: Cupón
      description: Representa un cupón, es utilizado en las transacciones.
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: Identificador único
              format: uuid
            display_coupon_type:
              type: string
              description: Tipo para mostrar
            uses:
              type: integer
              description: Usos reales del cupón
        - $ref: '#/components/schemas/coupon-create.v1'
    coupon-edit.v1:
      title: Cupón Edición
      type: object
      description: Representa el modelo de datos para editar un cupón.
      properties:
        coupon_id:
          type: string
          description: Identificador externo
        name:
          type: string
          description: Nombre
        coupon_type:
          type: string
          description: 'Tipo (opciones: A - Cantidad, P - Por ciento)'
          enum:
            - A
            - P
        code:
          type: string
          description: Código para utilizar el cupón
        value:
          type: number
          format: float
          description: >-
            Valor que se utilizará para disminuir el precio total del pedido. En
            caso de que sea un cupón de tipo cantidad, lo dismuirá justo en ese
            valor; y si es de tipo por ciento, lo disminuirá en en ese valor de
            manera porcentual.
        enabled:
          type: boolean
          description: 'Si está habilitado o no (por defecto: True)'
        expiration_date:
          type: string
          format: date-time
          pattern: YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]
          description: >-
            Fecha de expiración con el formato, en caso de no existir nunca
            expirará
        total_uses:
          type: integer
          description: >-
            La cantidad total de veces que se puede utilizar el cupón, en caso
            de no existir se puede utilizar indefinidamente
          minimum: 1
    gateway.v1:
      title: Pasarela de Pago
      type: object
      x-tags:
        - data
      description: Representa una pasarela de pago.
      x-examples: {}
      properties:
        id:
          type: string
          description: Identificador único
          format: uuid
        name:
          type: string
          description: Nombre
        code:
          type: string
          maxLength: 3
          example: EUR
          description: Código
          minLength: 3
        account_active:
          type: boolean
          description: Si está activa
    client-create.v1:
      title: Cliente Creación
      type: object
      description: Representa el modelo de datos para crear un cliente.
      properties:
        name:
          type: string
          description: Nombre
        client_id:
          type: string
          description: Identificador externo
        client_type:
          type: string
          description: 'Tipo de cliente (por defecto: individual)'
          format: float
          enum:
            - individual
            - company
        id_type:
          type: string
          enum:
            - national
            - foreign
            - passport
          description: 'Tipo de identificación (por defecto: national)'
        id_country:
          type: string
          description: País
          maxLength: 2
        id_number:
          type: string
          description: Número de identificación
        id_expiration_date:
          type: string
          format: date
          pattern: YYYY-MM-DD
          description: Fecha de expiración de la identificación
        email:
          type: string
          format: email
          description: Correo electrónico
        phone:
          type: string
          description: Teléfono
        web:
          type: string
          format: uri
          description: Web
        incorporation_date:
          type: string
          format: date
          pattern: YYYY-MM-DD
          description: Fecha de incorporación de la empresa
        birth_date:
          type: string
          format: date
          pattern: YYYY-MM-DD
          description: Fecha de nacimiento del individuo
        birth_country:
          type: string
          description: País de nacimiento del individuo
          maxLength: 2
        nationality:
          type: string
          description: Nacionalidad del individuo
          maxLength: 2
        street:
          type: string
          description: Calle y número
        postal_code:
          type: string
          description: Código postal
        city:
          type: string
          description: Ciudad
        province:
          type: string
          description: Provincia
        country:
          type: string
          description: País
          maxLength: 2
        notify_url:
          type: string
          format: uri
          description: >-
            URL de notificación. Se envían a esta url las notificaciones de
            cambio de estado
        enabled:
          type: boolean
          description: 'Si esta habilitado o no (por defecto: False)'
      required:
        - name
        - id_country
        - id_number
    client.v1:
      title: Cliente
      description: Representa un cliente.
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: Identificador único
              format: uuid
            enabled_by_compliance:
              type: boolean
              description: Si esta habilitado o no por compliance
        - $ref: '#/components/schemas/client-create.v1'
    client-edit.v1:
      title: Cliente Edición
      type: object
      description: Representa el modelo de datos para editar un cliente.
      properties:
        name:
          type: string
          description: Nombre
        client_id:
          type: string
          description: Identificador externo
        email:
          type: string
          format: email
          description: Correo electrónico
        phone:
          type: string
          description: Teléfono
        web:
          type: string
          format: uri
          description: Web
        street:
          type: string
          description: Calle y número
        postal_code:
          type: string
          description: Código postal
        city:
          type: string
          description: Ciudad
        province:
          type: string
          description: Provincia
        country:
          type: string
          description: País
          maxLength: 2
        enabled:
          type: boolean
          description: 'Si esta habilitado o no (por defecto: False)'
    iban-create.v1:
      title: IBAN Creación
      type: object
      description: Representa el modelo de datos para crear un IBAN.
      x-tags:
        - transfers
        - clients
      properties:
        iban_id:
          type: string
          description: Identificador externo
        iban:
          type: string
          description: IBAN
        notify_url:
          type: string
          format: uri
          description: >-
            URL de notificación. Se envían a esta url las notificaciones de
            cambio de estado
        enabled:
          type: boolean
          description: 'Si esta habilitado o no (por defecto: False)'
      required:
        - iban
    iban.v1:
      title: IBAN
      description: Representa un iban, es utilizado en las transferencias y los clientes.
      x-tags:
        - transfers
        - clients
      allOf:
        - type: object
          properties:
            id:
              type: string
              format: uuid
              description: Identificador único
            enabled_by_compliance:
              type: boolean
              description: Si esta habilitado o no por compliance
        - $ref: '#/components/schemas/iban-create.v1'
    iban-edit.v1:
      title: IBAN Edición
      type: object
      description: Representa el modelo de datos para editar un IBAN.
      x-tags:
        - transfers
        - clients
      properties:
        iban_id:
          type: string
          description: Identificador externo
    document-create.v1:
      title: Documento Creación
      type: object
      description: Representa el modelo de datos para crear un Documento.
      x-tags:
        - clients
      properties:
        file:
          type: object
          description: Documento a subir (archivo)
        type:
          type: string
          description: Tipo de documento
      required:
        - file
        - type
    document.v1:
      title: Documento
      description: Representa un documento, es utilizado en los clientes.
      x-tags:
        - clients
      allOf:
        - type: object
          properties:
            id:
              type: string
              format: uuid
              description: Identificador único
            status:
              type: string
              description: Estado del documento
        - $ref: '#/components/schemas/document-create.v1'
    wallet-create.v1:
      title: Cuenta de Pago Creación
      type: object
      description: Representa el modelo de datos para crear una cuenta de pago.
      properties:
        wallet_id:
          type: string
          description: Identificador externo
        name:
          type: string
          description: Nombre
        client_id:
          type: string
          description: Cliente a la que pertenece la cuenta de pago
        currency:
          type: string
          description: Moneda en formato ISO
          maxLength: 3
          minLength: 3
        notify_url:
          type: string
          format: uri
          description: >-
            URL de notificación. Se envían a esta url las notificaciones de
            cambio de estado
        enabled:
          type: boolean
          description: 'Si está habilitado o no (por defecto: False)'
      required:
        - name
        - client_id
        - currency
    wallet.v1:
      title: Cuenta de Pago
      description: Representa una cuenta de pago.
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: Identificador único
              format: uuid
            enabled_by_compliance:
              type: boolean
              description: Si esta habilitado o no por compliance
        - $ref: '#/components/schemas/wallet-create.v1'
    wallet-edit.v1:
      title: Cuenta de Pago Edición
      type: object
      description: Representa el modelo de datos para editar una cuenta de pago.
      properties:
        wallet_id:
          type: string
          description: Identificador externo
        name:
          type: string
          description: Nombre
        enabled:
          type: boolean
          description: 'Si está habilitado o no (por defecto: False)'
    entry.v1:
      title: Movimiento
      type: object
      x-tags:
        - data
      description: Representa una movimiento.
      x-examples: {}
      properties:
        id:
          type: string
          description: Identificador único
          format: uuid
        wallet:
          type: string
          description: Identificador de la cuenta de pago a la que pertenece
          format: uuid
        amount:
          type: number
          description: Cantidad
          format: float
        balance:
          type: number
          description: Balance de la cuenta de pago después del movimiento
          format: float
        concept:
          type: string
          description: Concepto del movimiento
        currency:
          type: string
          minLength: 3
          maxLength: 3
          description: Moneda en formato ISO
        date:
          type: string
          format: date-time
          description: Fecha del movimiento
          pattern: YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]
        with_wallet:
          type:
            - string
            - 'null'
          format: uuid
          description: Cuenta de pago con la que tiene relación el movimiento
        with_sale:
          type:
            - string
            - 'null'
          description: Pago con el que tiene relación el movimiento
          format: uuid
        with_external:
          type:
            - string
            - 'null'
          description: Método externo relacionada con el movimiento
    transfer-create.v1:
      title: Transferencia Creación
      x-tags:
        - payments
      description: >-
        Representa el modelo de datos para crear una transferencia. Al
        utilizarlo en la creación se debe enviar `to_wallet_id` o `iban` o
        `iban_value`, siempre uno de ellos.
      type: object
      properties:
        transfer_id:
          type: string
          description: Identificador externo
        wallet_id:
          type: string
          format: uuid
          description: Identificador de la Cuenta de Pago
        amount:
          type: number
          format: float
          description: Cantidad a transferir
        concept:
          type: string
          description: Concepto
        to_wallet_id:
          type: string
          description: Identificador de la Cuenta de Pago a la que se transfiere
          format: uuid
        iban_id:
          type: string
          format: uuid
          description: 'Identificador de iban existente en el API '
        iban_value:
          type: string
          description: IBAN externo
        iban_owner:
          type: string
          description: Nombre del titular del IBAN externo
        extra:
          type: string
          description: Valores extra en formato JSON
        notify_url:
          type: string
          format: uri
          description: >-
            URL de notificación. Se envían a esta url las notificaciones de
            cambio de estado
      required:
        - wallet_id
        - amount
        - concept
    transfer.v1:
      title: Transferencia
      x-tags:
        - payments
      description: Representa una transferencia.
      allOf:
        - type: object
          properties:
            id:
              type: string
              format: uuid
              description: Identificador único
            status:
              type: string
              description: >-
                Estado de la transferencia (N - Pendiente, D - Completada, F -
                Fallada)
              enum:
                - P
                - D
                - F
        - $ref: '#/components/schemas/transfer-create.v1'
  securitySchemes:
    AppKeys:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        El header Authorization debe tener como valor AppKeys PUBLIC:SECRET. Los
        valores PUBLIC y SECRET se obtienen accediendo al panel de ZRU
tags:
  - name: Transaction
    description: ' '
  - name: Subscription
    description: ' '
  - name: Authorization
    description: ' '
  - name: Sale
    description: ' '
  - name: Product
    description: ' '
  - name: Plan
    description: ' '
  - name: Tax
    description: ' '
  - name: Shipping
    description: ' '
  - name: Coupon
    description: ' '
  - name: Client
    description: ' '
  - name: Wallet
    description: ' '
  - name: Transfer
    description: ' '
  - name: Gateway
    description: ' '
  - name: Currency
    description: Currency
security:
  - AppKeys: []
