arazzo: 1.0.1
info:
title: Soracom Register and Verify Coupon
summary: List currently registered coupons, register a new coupon code, then re-list to confirm the credit applied.
description: >-
Applies prepaid credit to a Soracom account via a coupon code. The workflow
first lists the coupons already registered for context, registers the new
coupon code to add its balance, and re-lists the coupons to confirm the new
coupon now appears with its balance. Every step spells out its request inline
so the flow can be read and executed without opening the underlying OpenAPI
description.
version: 1.0.0
x-realizes-capability-ids:
- BC-4250
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-4250
capability_name: Subscription Billing & Revenue Management
spec: soracom-payment-api-openapi.yml
confidence: 0.8
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: paymentApi
url: ../openapi/soracom-payment-api-openapi.yml
type: openapi
workflows:
- workflowId: register-and-verify-coupon
summary: Register a coupon code and confirm it appears in the registered coupon list.
description: >-
Lists existing coupons, registers the supplied coupon code, and re-lists to
confirm the registered coupon balance.
inputs:
type: object
required:
- couponCode
properties:
couponCode:
type: string
description: The coupon code to register against the account.
steps:
- stepId: listBefore
description: >-
List currently registered coupons to capture the state before the new
coupon is applied.
operationId: listCoupons
successCriteria:
- condition: $statusCode == 200
outputs:
couponsBefore: $response.body#/couponList
- stepId: registerCoupon
description: >-
Register the supplied coupon code, adding its balance to the account.
operationId: registerCoupon
parameters:
- name: coupon_code
in: path
value: $inputs.couponCode
successCriteria:
- condition: $statusCode == 200
outputs:
registeredCouponCode: $response.body#/couponCode
balance: $response.body#/balance
- stepId: listAfter
description: >-
Re-list the registered coupons to confirm the newly registered coupon now
appears.
operationId: listCoupons
successCriteria:
- condition: $statusCode == 200
outputs:
couponsAfter: $response.body#/couponList
outputs:
registeredCouponCode: $steps.registerCoupon.outputs.registeredCouponCode
balance: $steps.registerCoupon.outputs.balance
couponsAfter: $steps.listAfter.outputs.couponsAfter
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.