diff --git a/openapi/components/schemas/Invoice.yaml b/openapi/components/schemas/Invoice.yaml index 6f88a57e4b..c75e4322e6 100644 --- a/openapi/components/schemas/Invoice.yaml +++ b/openapi/components/schemas/Invoice.yaml @@ -24,6 +24,16 @@ properties: readOnly: true maxLength: 50 example: ord_01GYJPRKHBD6ZYHH897QCJMBS4 + quoteId: + type: + - "string" + - "null" + description: |- + ID of the related quote, if available. + This field is `null` if there are no related quotes. + readOnly: true + maxLength: 50 + example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ currency: x-sortable: true x-basic: true @@ -168,6 +178,7 @@ properties: readOnly: true enum: - "draft" + - "quotation" - "unpaid" - "paid" - "partially-paid" diff --git a/openapi/components/schemas/Quote.yaml b/openapi/components/schemas/Quote.yaml index 6ad53a2bf6..c826bdb343 100644 --- a/openapi/components/schemas/Quote.yaml +++ b/openapi/components/schemas/Quote.yaml @@ -1,387 +1,10 @@ -type: object -required: - - websiteId - - customerId - - items -properties: - id: - readOnly: true - description: ID of the quote. - type: string - maxLength: 50 - example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ - type: - description: Specifies the type of quote. A quote can be a subscription or a one-time purchase. - type: string - readOnly: true - enum: - - subscription-order - - one-time-order - acceptanceConditions: - type: array - writeOnly: true - description: Conditions that must be met for the quote to be automatically accepted. - items: - type: string - enum: - - customer - - payment - - organization - x-enumDescriptions: - customer: Quote is accepted when the customer accepts the quote. - payment: Quote is accepted when the customer pays the quote. - example: ['payment'] - default: ['customer'] - acceptanceFulfillment: - type: array - readOnly: true - description: List of `acceptanceConditions` with fulfillment status. - items: - type: object - properties: - condition: - type: string - enum: - - customer - - payment - - organization - isFulfilled: - type: boolean - status: - description: Status of the quote. - type: string - readOnly: true - enum: - - draft - - issued - - accepted - - rejected - - canceled - - expired - x-enumDescriptions: - draft: Quote can be edited. This quote cannot be sent to a customer. - issued: Quote cannot be edited. This quote can be sent to a customer. - accepted: Customer accepted the quote and created an order. - rejected: Customer rejected the quote. - canceled: Organization canceled the quote. - expired: Expired before customer or organization interaction. - websiteId: - $ref: ./WebsiteId.yaml - customerId: - $ref: ./CustomerId.yaml - orderId: - description: ID of the order. - readOnly: true - type: - - 'string' - - 'null' - maxLength: 50 - example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ - items: - type: array - description: Items included in the quote. - minItems: 1 - items: - type: object - required: - - plan - - quantity - properties: - id: - description: ID of the quote item. - readOnly: true - type: string - example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ - quantity: - description: Number of product units in the specified plan. - type: integer - minimum: 1 - plan: - description: Plan details. - oneOf: - - $ref: ./OriginalPlan.yaml - - $ref: ./FlexiblePlan.yaml - description: - type: string - description: Description of the quote item. - example: Charge per approved transaction with DCC - default: '' - maxLength: 255 - priceDescription: - type: string - description: |- - Price description of the quote item. - This value is only used for metered billing items. - example: 50% of the markup for approved transactions - default: '' - maxLength: 255 - createdTime: - $ref: ./CreatedTime.yaml - updatedTime: - $ref: ./UpdatedTime.yaml - _embedded: - type: object - description: Embedded objects that are requested by the `expand` query parameter. - readOnly: true - properties: - product: - type: object - deliveryAddress: - description: Delivery address of the order. - oneOf: - - $ref: ./ContactObject.yaml - - type: 'null' - billingAddress: - description: Billing address of the order. - oneOf: - - $ref: ./ContactObject.yaml - - type: 'null' - invoicePreview: - type: object - description: Preview of the quote invoice. - readOnly: true - properties: - currency: - description: Currency of the invoice. - $ref: ./CurrencyCode.yaml - initialAmounts: - type: object - description: Total amounts of the initial invoice. - properties: - amount: - description: Amount of the invoice. - type: number - x-type: Money - format: double - subtotalAmount: - description: Subtotal amount of the invoice. - type: number - x-type: Money - format: double - discountAmount: - description: Discount amount that is applied to the invoice. - type: number - x-type: Money - format: double - shippingAmount: - description: Shipping amount that is applied to the invoice. - type: number - x-type: Money - format: double - taxAmount: - description: Tax amount that is applied to the invoice. - type: number - x-type: Money - format: double - recurringAmounts: - type: - - 'object' - - 'null' - description: |- - Total amounts of the recurring invoice. - This includes recurring items only. - If the quote does not have recurring items, the value of this field is `null`. - properties: - amount: - description: Amount of the invoice. - type: number - x-type: Money - format: double - subtotalAmount: - description: Subtotal amount of the invoice. - type: number - x-type: Money - format: double - discountAmount: - description: Discount amount that is applied to the invoice. - type: number - x-type: Money - format: double - shippingAmount: - description: Shipping amount that is applied to the invoice. - type: number - x-type: Money - format: double - taxAmount: - description: Tax amount that is applied to the invoice. - type: number - x-type: Money - format: double - items: - type: array - description: Invoice items. - items: - type: object - properties: - quoteItemId: - description: ID of the related quote item. - type: string - example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ - type: - type: string - description: Type of the invoice item. - x-basic: true - enum: - - debit - - credit - name: - description: Name of the invoice item. - type: string - maxLength: 1000 - description: - description: Description of the invoice item. - type: string - example: Charge per approved transaction with DCC - maxLength: 255 - priceDescription: - type: string - description: Price description of the invoice item. - example: 50% of the markup for approved transactions - maxLength: 255 - unitPrice: - description: Unit price of the invoice item. - type: - - 'number' - - 'null' - format: double - quantity: - description: Quantity of the invoice item. - type: integer - period: - description: Date interval of the invoice item. - type: - - 'string' - - 'null' - setupUnitPrice: - description: Unit price of the invoice item. - type: - - 'number' - - 'null' - format: double - trialUnitPrice: - description: Unit price of the invoice item. - type: - - 'number' - - 'null' - format: double - trialPeriod: - description: Date interval of the invoice item trial. - type: - - 'string' - - 'null' - taxAmount: - description: Invoice item tax. - type: - - 'number' - - 'null' - format: double - setupTaxAmount: - description: Tax amount of the setup that is applied to the invoice. - type: - - 'number' - - 'null' - format: double - trialTaxAmount: - description: Tax amount of the trial that is applied to the invoice. - type: - - 'number' - - 'null' - format: double - paymentTerms: - description: Payment terms for the customer which are displayed on the quote. - type: string - expirationTime: - description: |- - Date and time when the quote expires. The default expiration time is one month from the time the quote is issued. - In a `draft` state, this field may be `null`. - type: - - 'string' - - 'null' - format: date-time - issuedTime: - description: Date and time when the quote is issued. - type: - - 'string' - - 'null' - readOnly: true - format: date-time - acceptedTime: - description: Date and time when the quote is accepted. - type: - - 'string' - - 'null' - readOnly: true - format: date-time - rejectedTime: - description: Date and time when the quote is rejected. - type: - - 'string' - - 'null' - readOnly: true - format: date-time - canceledTime: - description: Date and time when the quote is canceled. - type: - - 'string' - - 'null' - readOnly: true - format: date-time - redirectUrl: - description: URL to redirect the customer to when a quote is rejected. The default value is the website URL. - type: string - format: uri - signature: - type: object - properties: - showWrittenSignatureLines: - type: boolean - default: false - description: Specifies whether to show written signature lines. - organizationPrintedName: - type: - - 'string' - - 'null' - description: Printed name of the organization. - default: null - shipping: - $ref: ./Shipping.yaml - tax: - $ref: ./Taxes.yaml - couponIds: - type: - - 'array' - - 'null' - description: |- - List of coupons to redeem on the customer and apply to the order when the quote is accepted. - - For more information, see [Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/). - items: - type: string - description: Coupon ID. - _links: - type: array - description: Related links. - readOnly: true - items: - type: object - properties: - href: - description: Link URL. - type: string - rel: - description: Type of link. - type: string - enum: - - self - - quoteAcceptanceFormUrl - _embedded: - type: object - description: Embedded objects that are requested by the `expand` query parameter. - readOnly: true - properties: - customer: - type: object - website: - type: object - order: - type: object +discriminator: + propertyName: action + mapping: + create: ./QuoteCreateOrder.yaml + change: ./QuoteChangeOrder.yaml + reactivate: ./QuoteReactivateOrder.yaml +oneOf: + - $ref: ./QuoteCreateOrder.yaml + - $ref: ./QuoteChangeOrder.yaml + - $ref: ./QuoteReactivateOrder.yaml \ No newline at end of file diff --git a/openapi/components/schemas/QuoteChangeOrder.yaml b/openapi/components/schemas/QuoteChangeOrder.yaml new file mode 100644 index 0000000000..680676f1e7 --- /dev/null +++ b/openapi/components/schemas/QuoteChangeOrder.yaml @@ -0,0 +1,488 @@ +type: object +title: QuoteChangeOrder +required: + - websiteId + - customerId + - items + - action + - orderId +properties: + id: + readOnly: true + description: ID of the quote. + type: string + maxLength: 50 + example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + description: |- + Specifies the type of the quote. + A quote can be a subscription or a one-time purchase. + type: string + readOnly: true + enum: + - subscription-order + - one-time-order + action: + description: |- + Action of the quote for change order items. + When a quote is accepted, quote items are applied to the related order. + type: string + enum: + - change + example: change + acceptanceConditions: + type: array + writeOnly: true + description: Conditions that must be met for the quote to be automatically accepted. + items: + type: string + enum: + - customer + - payment + x-enumDescriptions: + customer: Quote can be accepted by customer. + payment: Related invoice must be paid in full. + example: ['payment'] + default: ['customer'] + acceptanceFulfillment: + type: array + readOnly: true + description: List of `acceptanceConditions` with fulfillment status. + items: + type: object + properties: + condition: + type: string + enum: + - customer + - payment + - organization + isFulfilled: + type: boolean + orderId: + description: ID of the related order. + type: string + maxLength: 50 + example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ + invoiceId: + type: string + description: ID of the payment invoice. + readOnly: true + maxLength: 50 + example: in_0YVF9605RKC62BP14NE2R7V2XT + status: + description: Status of the quote. + type: string + readOnly: true + enum: + - draft + - issued + - accepted + - rejected + - canceled + - expired + x-enumDescriptions: + draft: Quote can be edited. This quote cannot be sent to a customer. + issued: Quote cannot be edited. This quote can be sent to a customer. + accepted: Customer accepted the quote and the related order item changes are applied. + rejected: Customer rejected the quote. + canceled: Organization canceled the quote. + expired: Expired before customer or organization interaction. + websiteId: + $ref: ./WebsiteId.yaml + customerId: + $ref: ./CustomerId.yaml + items: + type: array + description: Items included in the quote. + minItems: 1 + items: + type: object + required: + - plan + - quantity + properties: + id: + description: ID of the quote item. + readOnly: true + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + quantity: + description: Number of product units in the specified plan. + type: integer + minimum: 1 + plan: + description: Plan details. + oneOf: + - $ref: ./OriginalPlan.yaml + - $ref: ./FlexiblePlan.yaml + description: + type: string + description: Description of the quote item. + example: Charge per approved transaction with DCC + default: '' + maxLength: 255 + priceDescription: + type: string + description: |- + Price description of the quote item. + This value is only used for metered billing items. + example: 50% of the markup for approved transactions + default: '' + maxLength: 255 + usageLimits: + type: + - 'object' + - 'null' + default: null + description: |- + Specifies the soft and hard usage limit thresholds for an item with a metered billing plan. + This value is ignored when the plan is not metered. + properties: + softLimit: + type: object + description: |- + Defines thresholds for notification purposes. + For example, to notify the customer that their usage is near the hard limit of their metered billing plan. + This notification informs the customer so that they can upgrade their plan before the hard limit is reached. + When the reported usage reaches 75%, 90%, and 100% of the configured limit a specific event is fired. + To notify the customer, a webhook and notification can be configured for this event. + This field is useful for accounting and customer success purposes. + The usage of metered billing plans can still be reported if the soft limit is reached. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + hardLimit: + type: object + description: |- + Defines a limit where the customer can no longer use the service. + Hard limits are used in addition to soft limits. + When a soft limit is reached, + a customer may receive a notification + but the service can still be provided up to the hard limit value so that the customer can upgrade their plan. + When the reported usage reaches the configured limit, + a specific event is triggered. + To notify the customer in the merchant system, + or block a service, + a webhook and notification can be configured for this event. + When the total usage reaches the hard limit quantity, + or amount values, + metered billing plan usages can no longer be reported. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + createdTime: + $ref: ./CreatedTime.yaml + updatedTime: + $ref: ./UpdatedTime.yaml + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + product: + type: object + renewalPolicy: + description: Specifies if the subscription retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. + type: string + enum: + - reset + - retain + prorated: + description: |- + Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period. + + In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`, + a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period length. + type: boolean + effectiveTime: + description: |- + Date from which the renewal time for `reset` operations and proration calculations are made. + If this field is omitted, this value defaults to the time of quote acceptance. + type: + - 'string' + - 'null' + format: date-time + keepTrial: + description: |- + Specifies if the subscription order must retain its active trial. + This field is only applicable if `renewalPolicy` is set to `retain`. + type: boolean + default: false + invoicePreview: + type: object + description: Preview of the quote invoice. + readOnly: true + properties: + currency: + description: Currency of the invoice. + $ref: ./CurrencyCode.yaml + initialAmounts: + type: object + description: Total amounts of the initial invoice. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + recurringAmounts: + type: + - 'object' + - 'null' + description: |- + Total amounts of the recurring invoice. + This includes recurring items only. + If the quote does not have recurring items, the value of this field is `null`. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + items: + type: array + description: Invoice items. + items: + type: object + properties: + quoteItemId: + description: ID of the related quote item. + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + type: string + description: Type of the invoice item. + x-basic: true + enum: + - debit + - credit + name: + description: Name of the invoice item. + type: string + maxLength: 1000 + description: + description: Description of the invoice item. + type: string + example: Charge per approved transaction with DCC + maxLength: 255 + priceDescription: + type: string + description: Price description of the invoice item. + example: 50% of the markup for approved transactions + maxLength: 255 + unitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + quantity: + description: Quantity of the invoice item. + type: integer + period: + description: Date interval of the invoice item. + type: + - 'string' + - 'null' + setupUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialPeriod: + description: Date interval of the invoice item trial. + type: + - 'string' + - 'null' + taxAmount: + description: Tax amount of the invoice item. + type: + - 'number' + - 'null' + format: double + setupTaxAmount: + description: Tax amount of the setup that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + trialTaxAmount: + description: Tax amount of the trial that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + paymentTerms: + description: Payment terms for the customer which are displayed on the quote. + type: string + expirationTime: + description: |- + Date and time when the quote expires. + The default expiration time is one month from the time the quote is issued. + In a `draft` state, this field may be `null`. + type: + - 'string' + - 'null' + format: date-time + issuedTime: + description: Date and time when the quote is issued. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + acceptedTime: + description: Date and time when the quote is accepted. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + rejectedTime: + description: Date and time when the quote is rejected. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + canceledTime: + description: Date and time when the quote is canceled. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + redirectUrl: + description: |- + URL to redirect the customer to when a quote is rejected. + The default value is the website URL. + type: string + format: uri + signature: + type: object + description: Written signature and printed organization name. + properties: + showWrittenSignatureLines: + type: boolean + default: false + description: Specifies whether to show written signature lines. + organizationPrintedName: + type: + - 'string' + - 'null' + description: Printed name of the organization. + default: null + shipping: + $ref: ./Shipping.yaml + tax: + $ref: ./Taxes.yaml + couponIds: + type: + - 'array' + - 'null' + description: |- + List of coupons to redeem on the customer and apply to the related invoice. + + For more information, see [Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/). + items: + type: string + description: Coupon ID. + _links: + type: array + description: Related links. + readOnly: true + items: + type: object + properties: + href: + description: Link URL. + type: string + rel: + description: |- + Type of link. + If the quote is issued, a customer can be redirected to the `invoicePaymentFormUrl` value + to pay the related invoice using one of the methods which are available to the customer. + type: string + enum: + - self + - quoteAcceptanceFormUrl + - invoicePaymentFormUrl + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + customer: + type: object + website: + type: object + order: + type: object + invoice: + type: object diff --git a/openapi/components/schemas/QuoteCreateOrder.yaml b/openapi/components/schemas/QuoteCreateOrder.yaml new file mode 100644 index 0000000000..7370afec36 --- /dev/null +++ b/openapi/components/schemas/QuoteCreateOrder.yaml @@ -0,0 +1,474 @@ +type: object +title: QuoteCreateOrder +required: + - websiteId + - customerId + - items + - action +properties: + id: + readOnly: true + description: ID of the quote. + type: string + maxLength: 50 + example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + description: |- + Specifies the type of the quote. + A quote can be a subscription or a one-time purchase. + type: string + readOnly: true + enum: + - subscription-order + - one-time-order + action: + description: |- + Action of the quote. + When a quote is accepted, a new order is created. + The `orderId` value is filled with a new generated value from the order. + type: string + enum: + - create + example: create + acceptanceConditions: + type: array + writeOnly: true + description: Conditions that must be met for the quote to be automatically accepted. + items: + type: string + enum: + - customer + - payment + x-enumDescriptions: + customer: Quote can be accepted by customer. + payment: Related invoice must be paid in full. + example: ['payment'] + default: ['customer'] + acceptanceFulfillment: + type: array + readOnly: true + description: List of `acceptanceConditions` with fulfillment status. + items: + type: object + properties: + condition: + type: string + enum: + - customer + - payment + - organization + isFulfilled: + type: boolean + orderId: + description: ID of the related order. + readOnly: true + type: + - 'string' + - 'null' + maxLength: 50 + example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ + invoiceId: + type: string + description: ID of the payment invoice. + readOnly: true + maxLength: 50 + example: in_0YVF9605RKC62BP14NE2R7V2XT + status: + description: Status of the quote. + type: string + readOnly: true + enum: + - draft + - issued + - accepted + - rejected + - canceled + - expired + x-enumDescriptions: + draft: Quote can be edited. This quote cannot be sent to a customer. + issued: Quote cannot be edited. This quote can be sent to a customer. + accepted: Customer accepted the quote and created an order. + rejected: Customer rejected the quote. + canceled: Organization canceled the quote. + expired: Expired before customer or organization interaction. + websiteId: + $ref: ./WebsiteId.yaml + customerId: + $ref: ./CustomerId.yaml + items: + type: array + description: Items included in the quote. + minItems: 1 + items: + type: object + required: + - plan + - quantity + properties: + id: + description: ID of the quote item. + readOnly: true + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + quantity: + description: Number of product units in the specified plan. + type: integer + minimum: 1 + plan: + description: Plan details. + oneOf: + - $ref: ./OriginalPlan.yaml + - $ref: ./FlexiblePlan.yaml + description: + type: string + description: Description of the quote item. + example: Charge per approved transaction with DCC + default: '' + maxLength: 255 + priceDescription: + type: string + description: |- + Price description of the quote item. + This value is only used for metered billing items. + example: 50% of the markup for approved transactions + default: '' + maxLength: 255 + usageLimits: + type: + - 'object' + - 'null' + default: null + description: |- + Specifies the soft and hard usage limit thresholds for an item with a metered billing plan. + This value is ignored when the plan is not metered. + properties: + softLimit: + type: object + description: |- + Defines thresholds for notification purposes. + For example, to notify the customer that their usage is near the hard limit of their metered billing plan. + This notification informs the customer so that they can upgrade their plan before the hard limit is reached. + When the reported usage reaches 75%, 90%, and 100% of the configured limit a specific event is fired. + To notify the customer, a webhook and notification can be configured for this event. + This field is useful for accounting and customer success purposes. + The usage of metered billing plans can still be reported if the soft limit is reached. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + hardLimit: + type: object + description: |- + Defines a limit where the customer can no longer use the service. + Hard limits are used in addition to soft limits. + When a soft limit is reached, + a customer may receive a notification + but the service can still be provided up to the hard limit value so that the customer can upgrade their plan. + When the reported usage reaches the configured limit, + a specific event is triggered. + To notify the customer in the merchant system, + or block a service, + a webhook and notification can be configured for this event. + When the total usage reaches the hard limit quantity, + or amount values, + metered billing plan usages can no longer be reported. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + createdTime: + $ref: ./CreatedTime.yaml + updatedTime: + $ref: ./UpdatedTime.yaml + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + product: + type: object + deliveryAddress: + description: Delivery address of the order. + oneOf: + - $ref: ./ContactObject.yaml + - type: 'null' + billingAddress: + description: Billing address of the order. + oneOf: + - $ref: ./ContactObject.yaml + - type: 'null' + invoicePreview: + type: object + description: Preview of the quote invoice. + readOnly: true + properties: + currency: + description: Currency of the invoice. + $ref: ./CurrencyCode.yaml + initialAmounts: + type: object + description: Total amounts of the initial invoice. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + recurringAmounts: + type: + - 'object' + - 'null' + description: |- + Total amounts of the recurring invoice. + This includes recurring items only. + If the quote does not have recurring items, the value of this field is `null`. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + items: + type: array + description: Invoice items. + items: + type: object + properties: + quoteItemId: + description: ID of the related quote item. + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + type: string + description: Type of the invoice item. + x-basic: true + enum: + - debit + - credit + name: + description: Name of the invoice item. + type: string + maxLength: 1000 + description: + description: Description of the invoice item. + type: string + example: Charge per approved transaction with DCC + maxLength: 255 + priceDescription: + type: string + description: Price description of the invoice item. + example: 50% of the markup for approved transactions + maxLength: 255 + unitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + quantity: + description: Quantity of the invoice item. + type: integer + period: + description: Date interval of the invoice item. + type: + - 'string' + - 'null' + setupUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialPeriod: + description: Date interval of the invoice item trial. + type: + - 'string' + - 'null' + taxAmount: + description: Tax amount of the invoice item. + type: + - 'number' + - 'null' + format: double + setupTaxAmount: + description: Tax amount of the setup that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + trialTaxAmount: + description: Tax amount of the trial that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + paymentTerms: + description: Payment terms for the customer which are displayed on the quote. + type: string + expirationTime: + description: |- + Date and time when the quote expires. + The default expiration time is one month from the time the quote is issued. + In a `draft` state, this field may be `null`. + type: + - 'string' + - 'null' + format: date-time + issuedTime: + description: Date and time when the quote is issued. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + acceptedTime: + description: Date and time when the quote is accepted. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + rejectedTime: + description: Date and time when the quote is rejected. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + canceledTime: + description: Date and time when the quote is canceled. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + redirectUrl: + description: |- + URL to redirect the customer to when a quote is rejected. + The default value is the website URL. + type: string + format: uri + signature: + type: object + description: Written signature and printed organization name. + properties: + showWrittenSignatureLines: + type: boolean + default: false + description: Specifies whether to show written signature lines. + organizationPrintedName: + type: + - 'string' + - 'null' + description: Printed name of the organization. + default: null + shipping: + $ref: ./Shipping.yaml + tax: + $ref: ./Taxes.yaml + couponIds: + type: + - 'array' + - 'null' + description: |- + List of coupons to redeem on the customer and apply to the related invoice. + + For more information, see [Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/). + items: + type: string + description: Coupon ID. + _links: + type: array + description: Related links. + readOnly: true + items: + type: object + properties: + href: + description: Link URL. + type: string + rel: + description: |- + Type of link. + If the quote is issued, a customer can be redirected to the `invoicePaymentFormUrl` value + to pay the related invoice using one of the methods which are available to the customer. + type: string + enum: + - self + - quoteAcceptanceFormUrl + - invoicePaymentFormUrl + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + customer: + type: object + website: + type: object + order: + type: object + invoice: + type: object diff --git a/openapi/components/schemas/QuoteReactivateOrder.yaml b/openapi/components/schemas/QuoteReactivateOrder.yaml new file mode 100644 index 0000000000..a396e5784c --- /dev/null +++ b/openapi/components/schemas/QuoteReactivateOrder.yaml @@ -0,0 +1,494 @@ +type: object +title: QuoteReactivateOrder +required: + - websiteId + - customerId + - items + - action + - orderId +properties: + id: + readOnly: true + description: ID of the quote. + type: string + maxLength: 50 + example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + description: |- + Specifies the type of the quote. + A quote can be a subscription or a one-time purchase. + type: string + readOnly: true + enum: + - subscription-order + - one-time-order + action: + description: |- + Action of the quote for churned or canceled order reactivation. + When a quote is accepted, quote items are applied to the order and order is reactivated. + type: string + enum: + - reactivate + example: reactivate + acceptanceConditions: + type: array + writeOnly: true + description: Conditions that must be met for the quote to be automatically accepted. + items: + type: string + enum: + - customer + - payment + x-enumDescriptions: + customer: Quote can be accepted by customer. + payment: Related invoice must be paid in full. + example: ['payment'] + default: ['customer'] + acceptanceFulfillment: + type: array + readOnly: true + description: List of `acceptanceConditions` with fulfillment status. + items: + type: object + properties: + condition: + type: string + enum: + - customer + - payment + - organization + isFulfilled: + type: boolean + orderId: + description: ID of the related order. + type: string + maxLength: 50 + example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ + invoiceId: + type: string + description: ID of the payment invoice. + readOnly: true + maxLength: 50 + example: in_0YVF9605RKC62BP14NE2R7V2XT + status: + description: Status of the quote. + type: string + readOnly: true + enum: + - draft + - issued + - accepted + - rejected + - canceled + - expired + x-enumDescriptions: + draft: Quote can be edited. This quote cannot be sent to a customer. + issued: Quote cannot be edited. This quote can be sent to a customer. + accepted: Customer accepted the quote and the related order is reactivated. + rejected: Customer rejected the quote. + canceled: Organization canceled the quote. + expired: Expired before customer or organization interaction. + websiteId: + $ref: ./WebsiteId.yaml + customerId: + $ref: ./CustomerId.yaml + items: + type: array + description: Items included in the quote. + minItems: 1 + items: + type: object + required: + - plan + - quantity + properties: + id: + description: ID of the quote item. + readOnly: true + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + quantity: + description: Number of product units in the specified plan. + type: integer + minimum: 1 + plan: + description: Plan details. + oneOf: + - $ref: ./OriginalPlan.yaml + - $ref: ./FlexiblePlan.yaml + description: + type: string + description: Description of the quote item. + example: Charge per approved transaction with DCC + default: '' + maxLength: 255 + priceDescription: + type: string + description: |- + Price description of the quote item. + This value is only used for metered billing items. + example: 50% of the markup for approved transactions + default: '' + maxLength: 255 + usageLimits: + type: + - 'object' + - 'null' + default: null + description: |- + Specifies the soft and hard usage limit thresholds for an item with a metered billing plan. + This value is ignored when the plan is not metered. + properties: + softLimit: + type: object + description: |- + Defines thresholds for notification purposes. + For example, to notify the customer that their usage is near the hard limit of their metered billing plan. + This notification informs the customer so that they can upgrade their plan before the hard limit is reached. + When the reported usage reaches 75%, 90%, and 100% of the configured limit a specific event is fired. + To notify the customer, a webhook and notification can be configured for this event. + This field is useful for accounting and customer success purposes. + The usage of metered billing plans can still be reported if the soft limit is reached. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + hardLimit: + type: object + description: |- + Defines a limit where the customer can no longer use the service. + Hard limits are used in addition to soft limits. + When a soft limit is reached, + a customer may receive a notification + but the service can still be provided up to the hard limit value so that the customer can upgrade their plan. + When the reported usage reaches the configured limit, + a specific event is triggered. + To notify the customer in the merchant system, + or block a service, + a webhook and notification can be configured for this event. + When the total usage reaches the hard limit quantity, + or amount values, + metered billing plan usages can no longer be reported. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + createdTime: + $ref: ./CreatedTime.yaml + updatedTime: + $ref: ./UpdatedTime.yaml + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + product: + type: object + effectiveTime: + description: |- + Date and time when the service period starts, + unless the subscription is canceled but still active. + + If the subscription is still active, + the subscription continues for the current service period. + + If this field is omitted, this value defaults to the current time. + type: + - 'string' + - 'null' + format: date-time + renewalTime: + description: |- + Date and time of the next subscription renewal. + If this field is omitted, this value is computed from the `effectiveTime` field. + + If the subscription is canceled but still active, + it is ignored and the next renewal occurs as scheduled. + type: + - 'string' + - 'null' + format: date-time + paymentInstrumentId: + description: |- + ID of the payment instrument. + If this field is omitted, the subscription payment instrument remains unchanged. + type: + - 'string' + - 'null' + maxLength: 50 + example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 + invoicePreview: + type: object + description: Preview of the quote invoice. + readOnly: true + properties: + currency: + description: Currency of the invoice. + $ref: ./CurrencyCode.yaml + initialAmounts: + type: object + description: Total amounts of the initial invoice. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + recurringAmounts: + type: + - 'object' + - 'null' + description: |- + Total amounts of the recurring invoice. + This includes recurring items only. + If the quote does not have recurring items, the value of this field is `null`. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + items: + type: array + description: Invoice items. + items: + type: object + properties: + quoteItemId: + description: ID of the related quote item. + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + type: string + description: Type of the invoice item. + x-basic: true + enum: + - debit + - credit + name: + description: Name of the invoice item. + type: string + maxLength: 1000 + description: + description: Description of the invoice item. + type: string + example: Charge per approved transaction with DCC + maxLength: 255 + priceDescription: + type: string + description: Price description of the invoice item. + example: 50% of the markup for approved transactions + maxLength: 255 + unitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + quantity: + description: Quantity of the invoice item. + type: integer + period: + description: Date interval of the invoice item. + type: + - 'string' + - 'null' + setupUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialPeriod: + description: Date interval of the invoice item trial. + type: + - 'string' + - 'null' + taxAmount: + description: Tax amount of the invoice item. + type: + - 'number' + - 'null' + format: double + setupTaxAmount: + description: Tax amount of the setup that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + trialTaxAmount: + description: Tax amount of the trial that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + paymentTerms: + description: Payment terms for the customer which are displayed on the quote. + type: string + expirationTime: + description: |- + Date and time when the quote expires. + The default expiration time is one month from the time the quote is issued. + In a `draft` state, this field may be `null`. + type: + - 'string' + - 'null' + format: date-time + issuedTime: + description: Date and time when the quote is issued. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + acceptedTime: + description: Date and time when the quote is accepted. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + rejectedTime: + description: Date and time when the quote is rejected. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + canceledTime: + description: Date and time when the quote is canceled. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + redirectUrl: + description: |- + URL to redirect the customer to when a quote is rejected. + The default value is the website URL. + type: string + format: uri + signature: + type: object + description: Written signature and printed organization name. + properties: + showWrittenSignatureLines: + type: boolean + default: false + description: Specifies whether to show written signature lines. + organizationPrintedName: + type: + - 'string' + - 'null' + description: Printed name of the organization. + default: null + shipping: + $ref: ./Shipping.yaml + tax: + $ref: ./Taxes.yaml + couponIds: + type: + - 'array' + - 'null' + description: |- + List of coupons to redeem on the customer and apply to the related invoice. + + For more information, see [Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/). + items: + type: string + description: Coupon ID. + _links: + type: array + description: Related links. + readOnly: true + items: + type: object + properties: + href: + description: Link URL. + type: string + rel: + description: |- + Type of link. + If the quote is issued, a customer can be redirected to the `invoicePaymentFormUrl` value + to pay the related invoice using one of the methods which are available to the customer. + type: string + enum: + - self + - quoteAcceptanceFormUrl + - invoicePaymentFormUrl + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + customer: + type: object + website: + type: object + order: + type: object + invoice: + type: object diff --git a/openapi/components/schemas/StorefrontQuote.yaml b/openapi/components/schemas/StorefrontQuote.yaml index 3c0b00425e..bfc87950ab 100644 --- a/openapi/components/schemas/StorefrontQuote.yaml +++ b/openapi/components/schemas/StorefrontQuote.yaml @@ -1,331 +1,10 @@ -type: object -required: - - websiteId - - customerId - - items -properties: - id: - readOnly: true - description: ID of the quote. - type: string - maxLength: 50 - example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ - type: - description: Specifies the type of quote. A quote can be a subscription or a one-time purchase. - type: string - readOnly: true - enum: - - subscription-order - - one-time-order - status: - description: Status of quote. - type: string - readOnly: true - enum: - - draft - - issued - - accepted - - rejected - - canceled - - expired - x-enumDescriptions: - draft: Quote can be edited. This quote cannot be sent to a customer. - issued: Quote cannot be edited. This quote can be sent to a customer. - accepted: Customer accepted the quote and created an order. - rejected: Customer rejected the quote. - canceled: Organization canceled the quote. - expired: Expired before customer or organization interaction. - websiteId: - $ref: ./WebsiteId.yaml - customerId: - $ref: ./CustomerId.yaml - orderId: - description: ID of the order. - readOnly: true - type: - - 'string' - - 'null' - maxLength: 50 - example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ - items: - type: array - minItems: 1 - items: - type: object - required: - - plan - - quantity - properties: - id: - description: ID of the quote item. - readOnly: true - type: string - example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ - quantity: - description: Number of product units in the specified plan. - type: integer - minimum: 1 - plan: - description: Plan details. - oneOf: - - $ref: ./OriginalPlan.yaml - - $ref: ./FlexiblePlan.yaml - createdTime: - $ref: ./CreatedTime.yaml - updatedTime: - $ref: ./UpdatedTime.yaml - _embedded: - type: object - description: Embedded objects that are requested by the `expand` query parameter. - readOnly: true - properties: - product: - type: object - deliveryAddress: - description: Delivery address of the order. - oneOf: - - $ref: ./ContactObject.yaml - - type: 'null' - billingAddress: - description: Billing address of the order. - oneOf: - - $ref: ./ContactObject.yaml - - type: 'null' - invoicePreview: - type: object - description: Preview of the quote invoice. - readOnly: true - properties: - currency: - description: Currency of the invoice. - $ref: ./CurrencyCode.yaml - initialAmounts: - type: object - description: Total amounts of the initial invoice. - properties: - amount: - description: Amount of the invoice. - type: number - x-type: Money - format: double - subtotalAmount: - description: Subtotal amount of the invoice. - type: number - x-type: Money - format: double - discountAmount: - description: Discount amount that is applied to the invoice. - type: number - x-type: Money - format: double - shippingAmount: - description: Shipping amount that is applied to the invoice. - type: number - x-type: Money - format: double - taxAmount: - description: Tax amount that is applied to the invoice. - type: number - x-type: Money - format: double - recurringAmounts: - type: - - 'object' - - 'null' - description: |- - Total amounts of the recurring invoice. - This includes recurring items only. - If the quote does not have recurring items, the value of this field is `null`. - properties: - amount: - description: Amount of the invoice. - type: number - x-type: Money - format: double - subtotalAmount: - description: Subtotal amount of the invoice. - type: number - x-type: Money - format: double - discountAmount: - description: Discount amount that is applied to the invoice. - type: number - x-type: Money - format: double - shippingAmount: - description: Shipping amount that is applied to the invoice. - type: number - x-type: Money - format: double - taxAmount: - description: Tax amount that is applied to the invoice. - type: number - x-type: Money - format: double - items: - type: array - description: Invoice items. - items: - type: object - properties: - quoteItemId: - description: ID of the related quote item. - type: string - example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ - type: - type: string - description: Type of the invoice item. - x-basic: true - enum: - - debit - - credit - name: - description: Name of the invoice item. - type: string - maxLength: 1000 - description: - description: Description of the invoice item. - type: string - example: Charge per approved transaction with DCC - maxLength: 255 - priceDescription: - type: string - description: Price description of the invoice item. - example: 50% of the markup for approved transactions - maxLength: 255 - unitPrice: - description: Unit price of the invoice item. - type: - - 'number' - - 'null' - format: double - quantity: - description: Quantity of the invoice item. - type: integer - period: - description: Date interval of the invoice item. - type: - - 'string' - - 'null' - setupUnitPrice: - description: Unit price of the invoice item. - type: - - 'number' - - 'null' - format: double - trialUnitPrice: - description: Unit price of the invoice item. - type: - - 'number' - - 'null' - format: double - trialPeriod: - description: Date interval of the invoice item trial. - type: - - 'string' - - 'null' - taxAmount: - description: Invoice item tax. - type: - - 'number' - - 'null' - format: double - setupTaxAmount: - description: Tax amount of the setup that is applied to the invoice. - type: - - 'number' - - 'null' - format: double - trialTaxAmount: - description: Tax amount of the trial that is applied to the invoice. - type: - - 'number' - - 'null' - format: double - paymentTerms: - description: Payment terms for the customer which are displayed on the quote. - type: string - expirationTime: - description: |- - Date and time when the quote expires. The default expiration time is one month from the time the quote is issued. - In a `draft` state, this field may be `null`. - type: - - 'string' - - 'null' - format: date-time - issuedTime: - description: Date and time when the quote is issued. - type: - - 'string' - - 'null' - readOnly: true - format: date-time - acceptedTime: - description: Date and time when the quote is accepted. - type: - - 'string' - - 'null' - readOnly: true - format: date-time - rejectedTime: - description: Date and time when the quote is rejected. - type: - - 'string' - - 'null' - readOnly: true - format: date-time - canceledTime: - description: Date and time when the quote is canceled. - type: - - 'string' - - 'null' - readOnly: true - format: date-time - redirectUrl: - description: URL to redirect the customer to when a quote is rejected. The default value is the website URL. - type: string - format: uri - signature: - type: object - properties: - showWrittenSignatureLines: - type: boolean - default: false - description: Specifies whether to show written signature lines. - organizationPrintedName: - type: - - 'string' - - 'null' - description: Printed name of the organization. - default: null - shipping: - $ref: ./Shipping.yaml - tax: - $ref: ./Taxes.yaml - _links: - type: array - description: Related links. - readOnly: true - items: - type: object - properties: - href: - description: Link URL. - type: string - rel: - description: |- - Type of link. If quote is accepted, a customer is redirected to `invoicePaymentFormUrl` - to pay the initial invoice using one of the methods which are available to the customer. - type: string - enum: - - self - - invoicePaymentFormUrl - _embedded: - type: object - description: Embedded objects that are requested by the `expand` query parameter. - readOnly: true - properties: - customer: - type: object - website: - type: object +discriminator: + propertyName: action + mapping: + create: ./StorefrontQuoteCreateOrder.yaml + change: ./StorefrontQuoteChangeOrder.yaml + reactivate: ./StorefrontQuoteReactivateOrder.yaml +oneOf: + - $ref: ./StorefrontQuoteCreateOrder.yaml + - $ref: ./StorefrontQuoteChangeOrder.yaml + - $ref: ./StorefrontQuoteReactivateOrder.yaml diff --git a/openapi/components/schemas/StorefrontQuoteChangeOrder.yaml b/openapi/components/schemas/StorefrontQuoteChangeOrder.yaml new file mode 100644 index 0000000000..7ae5b5b41c --- /dev/null +++ b/openapi/components/schemas/StorefrontQuoteChangeOrder.yaml @@ -0,0 +1,470 @@ +type: object +properties: + id: + readOnly: true + description: ID of the quote. + type: string + maxLength: 50 + example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + description: |- + Specifies the type of the quote. + A quote can be a subscription or a one-time purchase. + type: string + readOnly: true + enum: + - subscription-order + - one-time-order + action: + description: |- + Action of the quote for change order items. + When a quote is accepted, quote items are applied to the related order. + type: string + enum: + - change + example: change + acceptanceConditions: + type: array + writeOnly: true + description: Conditions that must be met for the quote to be automatically accepted. + items: + type: string + enum: + - customer + - payment + x-enumDescriptions: + customer: Quote can be accepted by customer. + payment: Related invoice must be paid in full. + example: ['payment'] + default: ['customer'] + acceptanceFulfillment: + type: array + readOnly: true + description: List of `acceptanceConditions` with fulfillment status. + items: + type: object + properties: + condition: + type: string + enum: + - customer + - payment + - organization + isFulfilled: + type: boolean + orderId: + description: ID of the related order. + readOnly: true + type: string + maxLength: 50 + example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ + invoiceId: + type: string + description: ID of the payment invoice. + readOnly: true + maxLength: 50 + example: in_0YVF9605RKC62BP14NE2R7V2XT + status: + description: Status of the quote. + type: string + readOnly: true + enum: + - draft + - issued + - accepted + - rejected + - canceled + - expired + x-enumDescriptions: + draft: Quote can be edited. This quote cannot be sent to a customer. + issued: Quote cannot be edited. This quote can be sent to a customer. + accepted: Customer accepted the quote and the related order item changes are applied. + rejected: Customer rejected the quote. + canceled: Organization canceled the quote. + expired: Expired before customer or organization interaction. + websiteId: + $ref: ./WebsiteId.yaml + customerId: + $ref: ./CustomerId.yaml + items: + type: array + description: Items included in the quote. + minItems: 1 + items: + type: object + required: + - plan + - quantity + properties: + id: + description: ID of the quote item. + readOnly: true + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + quantity: + description: Number of product units in the specified plan. + type: integer + minimum: 1 + plan: + description: Plan details. + oneOf: + - $ref: ./OriginalPlan.yaml + - $ref: ./FlexiblePlan.yaml + description: + type: string + description: Description of the quote item. + example: Charge per approved transaction with DCC + default: '' + maxLength: 255 + priceDescription: + type: string + description: |- + Price description of the quote item. + This value is only used for metered billing items. + example: 50% of the markup for approved transactions + default: '' + maxLength: 255 + usageLimits: + type: + - 'object' + - 'null' + default: null + description: |- + Specifies the soft and hard usage limit thresholds for an item with a metered billing plan. + This value is ignored when the plan is not metered. + properties: + softLimit: + type: object + description: |- + Defines thresholds for notification purposes. + For example, to notify the customer that their usage is near the hard limit of their metered billing plan. + This notification informs the customer so that they can upgrade their plan before the hard limit is reached. + When the reported usage reaches 75%, 90%, and 100% of the configured limit a specific event is fired. + To notify the customer, a webhook and notification can be configured for this event. + This field is useful for accounting and customer success purposes. + The usage of metered billing plans can still be reported if the soft limit is reached. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + hardLimit: + type: object + description: |- + Defines a limit where the customer can no longer use the service. + Hard limits are used in addition to soft limits. + When a soft limit is reached, + a customer may receive a notification + but the service can still be provided up to the hard limit value so that the customer can upgrade their plan. + When the reported usage reaches the configured limit, + a specific event is triggered. + To notify the customer in the merchant system, + or block a service, + a webhook and notification can be configured for this event. + When the total usage reaches the hard limit quantity, + or amount values, + metered billing plan usages can no longer be reported. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + createdTime: + $ref: ./CreatedTime.yaml + updatedTime: + $ref: ./UpdatedTime.yaml + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + product: + type: object + renewalPolicy: + description: Specifies if the subscription retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. + type: string + enum: + - reset + - retain + prorated: + description: |- + Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period. + + In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`, + a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period length. + type: boolean + effectiveTime: + description: |- + Date from which the renewal time for `reset` operations and proration calculations are made. + If this field is omitted, this value defaults to the time of quote acceptance. + type: + - 'string' + - 'null' + format: date-time + keepTrial: + description: |- + Specifies if the subscription order must retain its active trial. + This field is only applicable if `renewalPolicy` is set to `retain`. + type: boolean + default: false + invoicePreview: + type: object + description: Preview of the quote invoice. + readOnly: true + properties: + currency: + description: Currency of the invoice. + $ref: ./CurrencyCode.yaml + initialAmounts: + type: object + description: Total amounts of the initial invoice. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + recurringAmounts: + type: + - 'object' + - 'null' + description: |- + Total amounts of the recurring invoice. + This includes recurring items only. + If the quote does not have recurring items, the value of this field is `null`. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + items: + type: array + description: Invoice items. + items: + type: object + properties: + quoteItemId: + description: ID of the related quote item. + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + type: string + description: Type of the invoice item. + x-basic: true + enum: + - debit + - credit + name: + description: Name of the invoice item. + type: string + maxLength: 1000 + description: + description: Description of the invoice item. + type: string + example: Charge per approved transaction with DCC + maxLength: 255 + priceDescription: + type: string + description: Price description of the invoice item. + example: 50% of the markup for approved transactions + maxLength: 255 + unitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + quantity: + description: Quantity of the invoice item. + type: integer + period: + description: Date interval of the invoice item. + type: + - 'string' + - 'null' + setupUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialPeriod: + description: Date interval of the invoice item trial. + type: + - 'string' + - 'null' + taxAmount: + description: Tax amount of the invoice item. + type: + - 'number' + - 'null' + format: double + setupTaxAmount: + description: Tax amount of the setup that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + trialTaxAmount: + description: Tax amount of the trial that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + paymentTerms: + description: Payment terms for the customer which are displayed on the quote. + type: string + expirationTime: + description: |- + Date and time when the quote expires. + The default expiration time is one month from the time the quote is issued. + In a `draft` state, this field may be `null`. + type: + - 'string' + - 'null' + format: date-time + issuedTime: + description: Date and time when the quote is issued. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + acceptedTime: + description: Date and time when the quote is accepted. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + rejectedTime: + description: Date and time when the quote is rejected. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + canceledTime: + description: Date and time when the quote is canceled. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + redirectUrl: + description: |- + URL to redirect the customer to when a quote is rejected. + The default value is the website URL. + type: string + format: uri + signature: + type: object + description: Written signature and printed organization name. + properties: + showWrittenSignatureLines: + type: boolean + default: false + description: Specifies whether to show written signature lines. + organizationPrintedName: + type: + - 'string' + - 'null' + description: Printed name of the organization. + default: null + shipping: + $ref: ./Shipping.yaml + tax: + $ref: ./Taxes.yaml + _links: + type: array + description: Related links. + readOnly: true + items: + type: object + properties: + href: + description: Link URL. + type: string + rel: + description: |- + Type of link. + If the quote is issued, a customer can be redirected to the `invoicePaymentFormUrl` value + to pay the related invoice using one of the methods which are available to the customer. + type: string + enum: + - self + - invoicePaymentFormUrl + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + customer: + type: object + website: + type: object + order: + type: object + invoice: + type: object diff --git a/openapi/components/schemas/StorefrontQuoteCreateOrder.yaml b/openapi/components/schemas/StorefrontQuoteCreateOrder.yaml new file mode 100644 index 0000000000..e4957af3d7 --- /dev/null +++ b/openapi/components/schemas/StorefrontQuoteCreateOrder.yaml @@ -0,0 +1,456 @@ +type: object +properties: + id: + readOnly: true + description: ID of the quote. + type: string + maxLength: 50 + example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + description: |- + Specifies the type of the quote. + A quote can be a subscription or a one-time purchase. + type: string + readOnly: true + enum: + - subscription-order + - one-time-order + action: + description: |- + Action of the quote. + When a quote is accepted, a new order is created. + The `orderId` value is filled with a new generated value from the order. + type: string + enum: + - create + example: create + acceptanceConditions: + type: array + writeOnly: true + description: Conditions that must be met for the quote to be automatically accepted. + items: + type: string + enum: + - customer + - payment + x-enumDescriptions: + customer: Quote can be accepted by customer. + payment: Related invoice must be paid in full. + example: ['payment'] + default: ['customer'] + acceptanceFulfillment: + type: array + readOnly: true + description: List of `acceptanceConditions` with fulfillment status. + items: + type: object + properties: + condition: + type: string + enum: + - customer + - payment + - organization + isFulfilled: + type: boolean + orderId: + description: ID of the related order. + readOnly: true + type: + - 'string' + - 'null' + maxLength: 50 + example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ + invoiceId: + type: string + description: ID of the payment invoice. + readOnly: true + maxLength: 50 + example: in_0YVF9605RKC62BP14NE2R7V2XT + status: + description: Status of the quote. + type: string + readOnly: true + enum: + - draft + - issued + - accepted + - rejected + - canceled + - expired + x-enumDescriptions: + draft: Quote can be edited. This quote cannot be sent to a customer. + issued: Quote cannot be edited. This quote can be sent to a customer. + accepted: Customer accepted the quote and created an order. + rejected: Customer rejected the quote. + canceled: Organization canceled the quote. + expired: Expired before customer or organization interaction. + websiteId: + $ref: ./WebsiteId.yaml + customerId: + $ref: ./CustomerId.yaml + items: + type: array + description: Items included in the quote. + minItems: 1 + items: + type: object + required: + - plan + - quantity + properties: + id: + description: ID of the quote item. + readOnly: true + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + quantity: + description: Number of product units in the specified plan. + type: integer + minimum: 1 + plan: + description: Plan details. + oneOf: + - $ref: ./OriginalPlan.yaml + - $ref: ./FlexiblePlan.yaml + description: + type: string + description: Description of the quote item. + example: Charge per approved transaction with DCC + default: '' + maxLength: 255 + priceDescription: + type: string + description: |- + Price description of the quote item. + This value is only used for metered billing items. + example: 50% of the markup for approved transactions + default: '' + maxLength: 255 + usageLimits: + type: + - 'object' + - 'null' + default: null + description: |- + Specifies the soft and hard usage limit thresholds for an item with a metered billing plan. + This value is ignored when the plan is not metered. + properties: + softLimit: + type: object + description: |- + Defines thresholds for notification purposes. + For example, to notify the customer that their usage is near the hard limit of their metered billing plan. + This notification informs the customer so that they can upgrade their plan before the hard limit is reached. + When the reported usage reaches 75%, 90%, and 100% of the configured limit a specific event is fired. + To notify the customer, a webhook and notification can be configured for this event. + This field is useful for accounting and customer success purposes. + The usage of metered billing plans can still be reported if the soft limit is reached. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + hardLimit: + type: object + description: |- + Defines a limit where the customer can no longer use the service. + Hard limits are used in addition to soft limits. + When a soft limit is reached, + a customer may receive a notification + but the service can still be provided up to the hard limit value so that the customer can upgrade their plan. + When the reported usage reaches the configured limit, + a specific event is triggered. + To notify the customer in the merchant system, + or block a service, + a webhook and notification can be configured for this event. + When the total usage reaches the hard limit quantity, + or amount values, + metered billing plan usages can no longer be reported. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + createdTime: + $ref: ./CreatedTime.yaml + updatedTime: + $ref: ./UpdatedTime.yaml + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + product: + type: object + deliveryAddress: + description: Delivery address of the order. + oneOf: + - $ref: ./ContactObject.yaml + - type: 'null' + billingAddress: + description: Billing address of the order. + oneOf: + - $ref: ./ContactObject.yaml + - type: 'null' + invoicePreview: + type: object + description: Preview of the quote invoice. + readOnly: true + properties: + currency: + description: Currency of the invoice. + $ref: ./CurrencyCode.yaml + initialAmounts: + type: object + description: Total amounts of the initial invoice. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + recurringAmounts: + type: + - 'object' + - 'null' + description: |- + Total amounts of the recurring invoice. + This includes recurring items only. + If the quote does not have recurring items, the value of this field is `null`. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + items: + type: array + description: Invoice items. + items: + type: object + properties: + quoteItemId: + description: ID of the related quote item. + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + type: string + description: Type of the invoice item. + x-basic: true + enum: + - debit + - credit + name: + description: Name of the invoice item. + type: string + maxLength: 1000 + description: + description: Description of the invoice item. + type: string + example: Charge per approved transaction with DCC + maxLength: 255 + priceDescription: + type: string + description: Price description of the invoice item. + example: 50% of the markup for approved transactions + maxLength: 255 + unitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + quantity: + description: Quantity of the invoice item. + type: integer + period: + description: Date interval of the invoice item. + type: + - 'string' + - 'null' + setupUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialPeriod: + description: Date interval of the invoice item trial. + type: + - 'string' + - 'null' + taxAmount: + description: Tax amount of the invoice item. + type: + - 'number' + - 'null' + format: double + setupTaxAmount: + description: Tax amount of the setup that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + trialTaxAmount: + description: Tax amount of the trial that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + paymentTerms: + description: Payment terms for the customer which are displayed on the quote. + type: string + expirationTime: + description: |- + Date and time when the quote expires. + The default expiration time is one month from the time the quote is issued. + In a `draft` state, this field may be `null`. + type: + - 'string' + - 'null' + format: date-time + issuedTime: + description: Date and time when the quote is issued. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + acceptedTime: + description: Date and time when the quote is accepted. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + rejectedTime: + description: Date and time when the quote is rejected. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + canceledTime: + description: Date and time when the quote is canceled. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + redirectUrl: + description: |- + URL to redirect the customer to when a quote is rejected. + The default value is the website URL. + type: string + format: uri + signature: + type: object + description: Written signature and printed organization name. + properties: + showWrittenSignatureLines: + type: boolean + default: false + description: Specifies whether to show written signature lines. + organizationPrintedName: + type: + - 'string' + - 'null' + description: Printed name of the organization. + default: null + shipping: + $ref: ./Shipping.yaml + tax: + $ref: ./Taxes.yaml + _links: + type: array + description: Related links. + readOnly: true + items: + type: object + properties: + href: + description: Link URL. + type: string + rel: + description: |- + Type of link. + If the quote is issued, a customer can be redirected to the `invoicePaymentFormUrl` value + to pay the related invoice using one of the methods which are available to the customer. + type: string + enum: + - self + - invoicePaymentFormUrl + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + customer: + type: object + website: + type: object + order: + type: object + invoice: + type: object diff --git a/openapi/components/schemas/StorefrontQuoteReactivateOrder.yaml b/openapi/components/schemas/StorefrontQuoteReactivateOrder.yaml new file mode 100644 index 0000000000..127cb85ed8 --- /dev/null +++ b/openapi/components/schemas/StorefrontQuoteReactivateOrder.yaml @@ -0,0 +1,476 @@ +type: object +properties: + id: + readOnly: true + description: ID of the quote. + type: string + maxLength: 50 + example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + description: |- + Specifies the type of the quote. + A quote can be a subscription or a one-time purchase. + type: string + readOnly: true + enum: + - subscription-order + - one-time-order + action: + description: |- + Action of the quote for churned or canceled order reactivation. + When a quote is accepted, quote items are applied to the order and order is reactivated. + type: string + enum: + - reactivate + example: reactivate + acceptanceConditions: + type: array + writeOnly: true + description: Conditions that must be met for the quote to be automatically accepted. + items: + type: string + enum: + - customer + - payment + x-enumDescriptions: + customer: Quote can be accepted by customer. + payment: Related invoice must be paid in full. + example: ['payment'] + default: ['customer'] + acceptanceFulfillment: + type: array + readOnly: true + description: List of `acceptanceConditions` with fulfillment status. + items: + type: object + properties: + condition: + type: string + enum: + - customer + - payment + - organization + isFulfilled: + type: boolean + orderId: + description: ID of the related order. + readOnly: true + type: string + maxLength: 50 + example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ + invoiceId: + type: string + description: ID of the payment invoice. + readOnly: true + maxLength: 50 + example: in_0YVF9605RKC62BP14NE2R7V2XT + status: + description: Status of the quote. + type: string + readOnly: true + enum: + - draft + - issued + - accepted + - rejected + - canceled + - expired + x-enumDescriptions: + draft: Quote can be edited. This quote cannot be sent to a customer. + issued: Quote cannot be edited. This quote can be sent to a customer. + accepted: Customer accepted the quote and the related order is reactivated. + rejected: Customer rejected the quote. + canceled: Organization canceled the quote. + expired: Expired before customer or organization interaction. + websiteId: + $ref: ./WebsiteId.yaml + customerId: + $ref: ./CustomerId.yaml + items: + type: array + description: Items included in the quote. + minItems: 1 + items: + type: object + required: + - plan + - quantity + properties: + id: + description: ID of the quote item. + readOnly: true + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + quantity: + description: Number of product units in the specified plan. + type: integer + minimum: 1 + plan: + description: Plan details. + oneOf: + - $ref: ./OriginalPlan.yaml + - $ref: ./FlexiblePlan.yaml + description: + type: string + description: Description of the quote item. + example: Charge per approved transaction with DCC + default: '' + maxLength: 255 + priceDescription: + type: string + description: |- + Price description of the quote item. + This value is only used for metered billing items. + example: 50% of the markup for approved transactions + default: '' + maxLength: 255 + usageLimits: + type: + - 'object' + - 'null' + default: null + description: |- + Specifies the soft and hard usage limit thresholds for an item with a metered billing plan. + This value is ignored when the plan is not metered. + properties: + softLimit: + type: object + description: |- + Defines thresholds for notification purposes. + For example, to notify the customer that their usage is near the hard limit of their metered billing plan. + This notification informs the customer so that they can upgrade their plan before the hard limit is reached. + When the reported usage reaches 75%, 90%, and 100% of the configured limit a specific event is fired. + To notify the customer, a webhook and notification can be configured for this event. + This field is useful for accounting and customer success purposes. + The usage of metered billing plans can still be reported if the soft limit is reached. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + hardLimit: + type: object + description: |- + Defines a limit where the customer can no longer use the service. + Hard limits are used in addition to soft limits. + When a soft limit is reached, + a customer may receive a notification + but the service can still be provided up to the hard limit value so that the customer can upgrade their plan. + When the reported usage reaches the configured limit, + a specific event is triggered. + To notify the customer in the merchant system, + or block a service, + a webhook and notification can be configured for this event. + When the total usage reaches the hard limit quantity, + or amount values, + metered billing plan usages can no longer be reported. + minProperties: 1 + maxProperties: 1 + properties: + quantity: + type: integer + description: Usage limit quantity. + minimum: 1 + amount: + type: number + format: double + description: Usage limit amount in the currency of the order. + minimum: 0.01 + createdTime: + $ref: ./CreatedTime.yaml + updatedTime: + $ref: ./UpdatedTime.yaml + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + product: + type: object + effectiveTime: + description: |- + Date and time when the service period starts, + unless the subscription is canceled but still active. + + If the subscription is still active, + the subscription continues for the current service period. + + If this field is omitted, this value defaults to the current time. + type: + - 'string' + - 'null' + format: date-time + renewalTime: + description: |- + Date and time of the next subscription renewal. + If this field is omitted, this value is computed from the `effectiveTime` field. + + If the subscription is canceled but still active, + it is ignored and the next renewal occurs as scheduled. + type: + - 'string' + - 'null' + format: date-time + paymentInstrumentId: + description: |- + ID of the payment instrument. + If this field is omitted, the subscription payment instrument remains unchanged. + type: + - 'string' + - 'null' + maxLength: 50 + example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 + invoicePreview: + type: object + description: Preview of the quote invoice. + readOnly: true + properties: + currency: + description: Currency of the invoice. + $ref: ./CurrencyCode.yaml + initialAmounts: + type: object + description: Total amounts of the initial invoice. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + recurringAmounts: + type: + - 'object' + - 'null' + description: |- + Total amounts of the recurring invoice. + This includes recurring items only. + If the quote does not have recurring items, the value of this field is `null`. + properties: + amount: + description: Amount of the invoice. + type: number + x-type: Money + format: double + subtotalAmount: + description: Subtotal amount of the invoice. + type: number + x-type: Money + format: double + discountAmount: + description: Discount amount that is applied to the invoice. + type: number + x-type: Money + format: double + shippingAmount: + description: Shipping amount that is applied to the invoice. + type: number + x-type: Money + format: double + taxAmount: + description: Tax amount that is applied to the invoice. + type: number + x-type: Money + format: double + items: + type: array + description: Invoice items. + items: + type: object + properties: + quoteItemId: + description: ID of the related quote item. + type: string + example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ + type: + type: string + description: Type of the invoice item. + x-basic: true + enum: + - debit + - credit + name: + description: Name of the invoice item. + type: string + maxLength: 1000 + description: + description: Description of the invoice item. + type: string + example: Charge per approved transaction with DCC + maxLength: 255 + priceDescription: + type: string + description: Price description of the invoice item. + example: 50% of the markup for approved transactions + maxLength: 255 + unitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + quantity: + description: Quantity of the invoice item. + type: integer + period: + description: Date interval of the invoice item. + type: + - 'string' + - 'null' + setupUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialUnitPrice: + description: Unit price of the invoice item. + type: + - 'number' + - 'null' + format: double + trialPeriod: + description: Date interval of the invoice item trial. + type: + - 'string' + - 'null' + taxAmount: + description: Tax amount of the invoice item. + type: + - 'number' + - 'null' + format: double + setupTaxAmount: + description: Tax amount of the setup that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + trialTaxAmount: + description: Tax amount of the trial that is applied to the invoice. + type: + - 'number' + - 'null' + format: double + paymentTerms: + description: Payment terms for the customer which are displayed on the quote. + type: string + expirationTime: + description: |- + Date and time when the quote expires. + The default expiration time is one month from the time the quote is issued. + In a `draft` state, this field may be `null`. + type: + - 'string' + - 'null' + format: date-time + issuedTime: + description: Date and time when the quote is issued. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + acceptedTime: + description: Date and time when the quote is accepted. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + rejectedTime: + description: Date and time when the quote is rejected. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + canceledTime: + description: Date and time when the quote is canceled. + type: + - 'string' + - 'null' + readOnly: true + format: date-time + redirectUrl: + description: |- + URL to redirect the customer to when a quote is rejected. + The default value is the website URL. + type: string + format: uri + signature: + type: object + description: Written signature and printed organization name. + properties: + showWrittenSignatureLines: + type: boolean + default: false + description: Specifies whether to show written signature lines. + organizationPrintedName: + type: + - 'string' + - 'null' + description: Printed name of the organization. + default: null + shipping: + $ref: ./Shipping.yaml + tax: + $ref: ./Taxes.yaml + _links: + type: array + description: Related links. + readOnly: true + items: + type: object + properties: + href: + description: Link URL. + type: string + rel: + description: |- + Type of link. + If the quote is issued, a customer can be redirected to the `invoicePaymentFormUrl` value + to pay the related invoice using one of the methods which are available to the customer. + type: string + enum: + - self + - invoicePaymentFormUrl + _embedded: + type: object + description: Embedded objects that are requested by the `expand` query parameter. + readOnly: true + properties: + customer: + type: object + website: + type: object + order: + type: object + invoice: + type: object diff --git a/openapi/paths/quotes.yaml b/openapi/paths/quotes.yaml index 6588da0142..588a782464 100644 --- a/openapi/paths/quotes.yaml +++ b/openapi/paths/quotes.yaml @@ -1,4 +1,5 @@ get: + x-badge: Experimental x-products: - Core tags: @@ -34,6 +35,7 @@ get: '403': $ref: ../components/responses/Forbidden.yaml post: + x-badge: Experimental x-products: - Core tags: diff --git a/openapi/paths/quotes@{id}.yaml b/openapi/paths/quotes@{id}.yaml index f608e1140e..259d477770 100644 --- a/openapi/paths/quotes@{id}.yaml +++ b/openapi/paths/quotes@{id}.yaml @@ -1,6 +1,7 @@ parameters: - $ref: ../components/parameters/resourceId.yaml get: + x-badge: Experimental x-products: - Core tags: @@ -29,6 +30,7 @@ get: '404': $ref: ../components/responses/NotFound.yaml put: + x-badge: Experimental x-products: - Core tags: @@ -71,6 +73,7 @@ put: '422': $ref: ../components/responses/ValidationError.yaml patch: + x-badge: Experimental x-products: - Core tags: diff --git a/openapi/paths/quotes@{id}@accept.yaml b/openapi/paths/quotes@{id}@accept.yaml index 6ad2b1c73f..4c3d7349ad 100644 --- a/openapi/paths/quotes@{id}@accept.yaml +++ b/openapi/paths/quotes@{id}@accept.yaml @@ -1,6 +1,7 @@ parameters: - $ref: ../components/parameters/resourceId.yaml post: + x-badge: Experimental x-products: - Core tags: diff --git a/openapi/paths/quotes@{id}@cancel.yaml b/openapi/paths/quotes@{id}@cancel.yaml index 545dff88c8..23c158ab0f 100644 --- a/openapi/paths/quotes@{id}@cancel.yaml +++ b/openapi/paths/quotes@{id}@cancel.yaml @@ -1,6 +1,7 @@ parameters: - $ref: ../components/parameters/resourceId.yaml post: + x-badge: Experimental x-products: - Core tags: diff --git a/openapi/paths/quotes@{id}@issue.yaml b/openapi/paths/quotes@{id}@issue.yaml index 2c6dda790f..39da138f05 100644 --- a/openapi/paths/quotes@{id}@issue.yaml +++ b/openapi/paths/quotes@{id}@issue.yaml @@ -1,6 +1,7 @@ parameters: - $ref: ../components/parameters/resourceId.yaml post: + x-badge: Experimental x-products: - Core tags: diff --git a/openapi/paths/quotes@{id}@recall.yaml b/openapi/paths/quotes@{id}@recall.yaml index 6cf62f9e47..6b44d4a6b7 100644 --- a/openapi/paths/quotes@{id}@recall.yaml +++ b/openapi/paths/quotes@{id}@recall.yaml @@ -1,6 +1,7 @@ parameters: - $ref: ../components/parameters/resourceId.yaml post: + x-badge: Experimental x-products: - Core tags: diff --git a/openapi/paths/quotes@{id}@reject.yaml b/openapi/paths/quotes@{id}@reject.yaml index e1643122ac..99e1753efd 100644 --- a/openapi/paths/quotes@{id}@reject.yaml +++ b/openapi/paths/quotes@{id}@reject.yaml @@ -1,6 +1,7 @@ parameters: - $ref: ../components/parameters/resourceId.yaml post: + x-badge: Experimental x-products: - Core tags: diff --git a/openapi/paths/quotes@{id}@timeline.yaml b/openapi/paths/quotes@{id}@timeline.yaml index b118774e22..9f39aea8ab 100644 --- a/openapi/paths/quotes@{id}@timeline.yaml +++ b/openapi/paths/quotes@{id}@timeline.yaml @@ -1,6 +1,7 @@ parameters: - $ref: ../components/parameters/resourceId.yaml get: + x-badge: Experimental x-products: - Core tags: @@ -37,6 +38,7 @@ get: $ref: ../components/responses/Forbidden.yaml post: + x-badge: Experimental x-products: - Core tags: diff --git a/openapi/paths/quotes@{id}@timeline@{messageId}.yaml b/openapi/paths/quotes@{id}@timeline@{messageId}.yaml index 969313e326..3c7e7326f1 100644 --- a/openapi/paths/quotes@{id}@timeline@{messageId}.yaml +++ b/openapi/paths/quotes@{id}@timeline@{messageId}.yaml @@ -7,6 +7,7 @@ parameters: schema: type: string get: + x-badge: Experimental x-products: - Core tags: @@ -29,6 +30,7 @@ get: '404': $ref: ../components/responses/NotFound.yaml delete: + x-badge: Experimental x-products: - Core tags: diff --git a/openapi/paths/storefront/quotes@{id}.yaml b/openapi/paths/storefront/quotes@{id}.yaml index fcf36bb448..3a82c58d77 100644 --- a/openapi/paths/storefront/quotes@{id}.yaml +++ b/openapi/paths/storefront/quotes@{id}.yaml @@ -1,6 +1,7 @@ parameters: - $ref: ../../components/parameters/resourceId.yaml get: + x-badge: Experimental x-products: - Storefront tags: diff --git a/openapi/paths/storefront/quotes@{id}@accept.yaml b/openapi/paths/storefront/quotes@{id}@accept.yaml index 7b96ada788..343f700c72 100644 --- a/openapi/paths/storefront/quotes@{id}@accept.yaml +++ b/openapi/paths/storefront/quotes@{id}@accept.yaml @@ -1,6 +1,7 @@ parameters: - $ref: ../../components/parameters/resourceId.yaml post: + x-badge: Experimental x-products: - Storefront tags: diff --git a/openapi/paths/storefront/quotes@{id}@reject.yaml b/openapi/paths/storefront/quotes@{id}@reject.yaml index af1e050798..70d0793e0c 100644 --- a/openapi/paths/storefront/quotes@{id}@reject.yaml +++ b/openapi/paths/storefront/quotes@{id}@reject.yaml @@ -1,6 +1,7 @@ parameters: - $ref: ../../components/parameters/resourceId.yaml post: + x-badge: Experimental x-products: - Storefront tags: