openapi-client-generator 0.1.9

Generates a client library based on an OpenAPI spec.
parameters:
  - in: path
    name: chk_id
    description: id of the check
    required: true
    schema:
      $ref: "attributes/chk_id.yml"

get:
  operationId: check_retrieve

  summary: Retrieve

  description: >-
    Retrieves the details of an existing check. You need only supply
    the unique check identifier that was returned upon check creation.

  tags:
    - Checks

  responses:
    "200":
      description: Returns a check object
      content:
        $ref: responses/check.yml

    default:
      $ref: "../../shared/responses/mailpiece_error.yml"

  x-codeSamples:
    - lang: Shell
      source: |
        curl https://api.lob.com/v1/checks/chk_534f10783683daa0 \
          -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
      label: CURL
    - lang: Typescript
      source: |
        try {
          const check = await new ChecksApi(config).get("chk_xxxx");
        } catch (err: any) {
          console.error(err);
        }
      label: TYPESCRIPT
    - lang: Javascript
      source: |
        Lob.checks.retrieve('chk_534f10783683daa0', function (err, res) {
          console.log(err, res);
        });
      label: NODE
    - lang: Ruby
      source: |
        @lob.checks.find("chk_534f10783683daa0")
      label: RUBY
    - lang: Python
      source: |
        lob.Check.retrieve('chk_534f10783683daa0')
      label: PYTHON
    - lang: PHP
      source: |
        $lob->checks()->get('chk_534f10783683daa0');
    - lang: Java
      source: |
        LobResponse<Check> response = Check.retrieve("chk_534f10783683daa0");
        Check check = response.getResponseBody();
      label: JAVA
    - lang: Elixir
      source: |
        Lob.Check.find("chk_534f10783683daa0")
      label: ELIXIR

# For Form Factors, delete is actually cancel. If you need
# delete verbiage, check Bank Accounts or Template Versions.
delete:
  operationId: check_cancel

  summary: Cancel

  description: >-
    Completely removes a check from production. This can only be done if
    the check has a `send_date` and the `send_date` has not yet passed.
    If the check is successfully canceled, you will not be charged for it.
    Read more on [cancellation windows](#section/Cancellation-Windows)
    and [scheduling](#section/Scheduled-Mailings). Scheduling and
    cancellation is a premium feature. Upgrade to the appropriate
    [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions)
    to gain access.

  tags:
    - Checks

  responses:
    "200":
      $ref: ../../shared/responses/check_canceled.yml

    default:
      $ref: "../../shared/responses/mailpiece_error.yml"

  x-codeSamples:
    - lang: Shell
      source: |
        curl -X DELETE https://api.lob.com/v1/checks/chk_534f10783683daa0 \
          -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
      label: CURL
    - lang: Typescript
      source: |
        try {
          const deleteCheck = await new ChecksApi(config).delete("chk_xxxx");
        } catch (err: any) {
          console.error(err);
        }
      label: TYPESCRIPT
    - lang: Javascript
      source: |
        Lob.checks.delete('chk_534f10783683daa0', function (err, res) {
          console.log(err, res);
        });
      label: NODE
    - lang: Ruby
      source: |
        @lob.checks.destroy("chk_534f10783683daa0")
      label: RUBY
    - lang: Python
      source: |
        lob.Check.delete('chk_534f10783683daa0')
      label: PYTHON
    - lang: PHP
      source: |
        $lob->checks()->delete('chk_534f10783683daa0');
    - lang: Java
      source: |
        LobResponse<Check> response = Check.delete("chk_534f10783683daa0");
        Check check = response.getResponseBody();
      label: JAVA
    - lang: Elixir
      source: |
        Lob.Check.destroy("chk_534f10783683daa0")
      label: ELIXIR