chore(oas): [17/n] improve OAS schemas (#9284)

Improve OAS schemas [17/n]
This commit is contained in:
Shahed Nasser
2024-09-26 13:07:07 +00:00
committed by GitHub
parent 39a6780815
commit c5bf22f3f4
20 changed files with 679 additions and 205 deletions
@@ -0,0 +1,50 @@
/**
* @schema BaseOrderShippingDetail
* type: object
* description: Details of changes to a shipping method.
* x-schemaName: BaseOrderShippingDetail
* required:
* - id
* - shipping_method_id
* - shipping_method
* - claim_id
* - exchange_id
* - return_id
* - created_at
* - updated_at
* properties:
* id:
* type: string
* title: id
* description: The ID of the new changes to the shipping method.
* shipping_method_id:
* type: string
* title: shipping_method_id
* description: The ID of the shipping method.
* shipping_method:
* $ref: "#/components/schemas/BaseOrderShippingMethod"
* claim_id:
* type: string
* title: claim_id
* description: The ID of the associated claim.
* exchange_id:
* type: string
* title: exchange_id
* description: The ID of the associated exchange.
* return_id:
* type: string
* title: return_id
* description: The ID of the associated return.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the shipping method change was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the shipping method change was updated.
*
*/
@@ -1,7 +1,7 @@
/** /**
* @schema BaseOrderShippingMethod * @schema BaseOrderShippingMethod
* type: object * type: object
* description: The shipping method's shipping methods. * description: The shipping method's details.
* x-schemaName: BaseOrderShippingMethod * x-schemaName: BaseOrderShippingMethod
* required: * required:
* - id * - id
@@ -30,7 +30,7 @@
* order_id: * order_id:
* type: string * type: string
* title: order_id * title: order_id
* description: The shipping method's order id. * description: The ID of the order the shipping method belongs to.
* name: * name:
* type: string * type: string
* title: name * title: name
@@ -46,17 +46,19 @@
* is_tax_inclusive: * is_tax_inclusive:
* type: boolean * type: boolean
* title: is_tax_inclusive * title: is_tax_inclusive
* description: The shipping method's is tax inclusive. * description: Whether the shipping method's amount includes applied taxes.
* shipping_option_id: * shipping_option_id:
* type: string * type: string
* title: shipping_option_id * title: shipping_option_id
* description: The shipping method's shipping option id. * description: The ID of the shipping option this method was created from.
* data: * data:
* type: object * type: object
* description: The shipping method's data. * description: The shipping method's data, useful for fulfillment provider handling its fulfillment.
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
* metadata: * metadata:
* type: object * type: object
* description: The shipping method's metadata. * description: The shipping method's metadata, can hold custom key-value pairs.
* tax_lines: * tax_lines:
* type: array * type: array
* description: The shipping method's tax lines. * description: The shipping method's tax lines.
@@ -68,111 +70,47 @@
* items: * items:
* $ref: "#/components/schemas/BaseOrderShippingMethodAdjustment" * $ref: "#/components/schemas/BaseOrderShippingMethodAdjustment"
* original_total: * original_total:
* oneOf: * type: number
* - type: string * title: original_total
* title: original_total * description: The shipping method's total including taxes, excluding promotions.
* description: The shipping method's original total.
* - type: number
* title: original_total
* description: The shipping method's original total.
* - type: string
* title: original_total
* description: The shipping method's original total.
* - $ref: "#/components/schemas/IBigNumber"
* original_subtotal: * original_subtotal:
* oneOf: * type: number
* - type: string * title: original_subtotal
* title: original_subtotal * description: The shipping method's total excluding taxes, including promotions.
* description: The shipping method's original subtotal.
* - type: number
* title: original_subtotal
* description: The shipping method's original subtotal.
* - type: string
* title: original_subtotal
* description: The shipping method's original subtotal.
* - $ref: "#/components/schemas/IBigNumber"
* original_tax_total: * original_tax_total:
* oneOf: * type: number
* - type: string * title: original_tax_total
* title: original_tax_total * description: The shipping method's total taxes excluding promotions.
* description: The shipping method's original tax total.
* - type: number
* title: original_tax_total
* description: The shipping method's original tax total.
* - type: string
* title: original_tax_total
* description: The shipping method's original tax total.
* - $ref: "#/components/schemas/IBigNumber"
* total: * total:
* oneOf: * type: number
* - type: string * title: total
* title: total * description: The shipping method's total including taxes and promotions.
* description: The shipping method's total.
* - type: number
* title: total
* description: The shipping method's total.
* - type: string
* title: total
* description: The shipping method's total.
* - $ref: "#/components/schemas/IBigNumber"
* subtotal: * subtotal:
* oneOf: * type: number
* - type: string * title: subtotal
* title: subtotal * description: The shipping method's total excluding taxes, including promotions.
* description: The shipping method's subtotal.
* - type: number
* title: subtotal
* description: The shipping method's subtotal.
* - type: string
* title: subtotal
* description: The shipping method's subtotal.
* - $ref: "#/components/schemas/IBigNumber"
* tax_total: * tax_total:
* oneOf: * type: number
* - type: string * title: tax_total
* title: tax_total * description: The shipping method's tax total including promotions.
* description: The shipping method's tax total.
* - type: number
* title: tax_total
* description: The shipping method's tax total.
* - type: string
* title: tax_total
* description: The shipping method's tax total.
* - $ref: "#/components/schemas/IBigNumber"
* discount_total: * discount_total:
* oneOf: * type: number
* - type: string * title: discount_total
* title: discount_total * description: The total discounts applied on the shipping method.
* description: The shipping method's discount total.
* - type: number
* title: discount_total
* description: The shipping method's discount total.
* - type: string
* title: discount_total
* description: The shipping method's discount total.
* - $ref: "#/components/schemas/IBigNumber"
* discount_tax_total: * discount_tax_total:
* oneOf: * type: number
* - type: string * title: discount_tax_total
* title: discount_tax_total * description: The taxes applied on the discount amount.
* description: The shipping method's discount tax total.
* - type: number
* title: discount_tax_total
* description: The shipping method's discount tax total.
* - type: string
* title: discount_tax_total
* description: The shipping method's discount tax total.
* - $ref: "#/components/schemas/IBigNumber"
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The shipping method's created at. * description: The date the shipping method was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The shipping method's updated at. * description: The date the shipping method was updated.
* *
*/ */
@@ -3,6 +3,59 @@
* type: object * type: object
* description: The adjustment's adjustments. * description: The adjustment's adjustments.
* x-schemaName: BaseOrderShippingMethodAdjustment * x-schemaName: BaseOrderShippingMethodAdjustment
* properties:
* shipping_method:
* $ref: "#/components/schemas/BaseOrderShippingMethod"
* shipping_method_id:
* type: string
* title: shipping_method_id
* description: The ID of the shipping method this adjustment applies on.
* id:
* type: string
* title: id
* description: The adjustment's ID.
* code:
* type: string
* title: code
* description: The adjustment's code.
* amount:
* type: number
* title: amount
* description: The adjustment's amount.
* order_id:
* type: string
* title: order_id
* description: The ID of the associated order.
* description:
* type: string
* title: description
* description: The adjustment's description.
* promotion_id:
* type: string
* title: promotion_id
* description: The ID of the promotion applied by this adjustment.
* provider_id:
* type: string
* title: provider_id
* description: The adjustment's provider ID.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the adjustment was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the adjustment was updated.
* required:
* - shipping_method
* - shipping_method_id
* - id
* - amount
* - order_id
* - created_at
* - updated_at
* *
*/ */
@@ -1,8 +1,67 @@
/** /**
* @schema BaseOrderShippingMethodTaxLine * @schema BaseOrderShippingMethodTaxLine
* type: object * type: object
* description: The tax line's tax lines. * description: The tax line's details.
* x-schemaName: BaseOrderShippingMethodTaxLine * x-schemaName: BaseOrderShippingMethodTaxLine
* properties:
* shipping_method:
* $ref: "#/components/schemas/BaseOrderShippingMethod"
* shipping_method_id:
* type: string
* title: shipping_method_id
* description: The ID of the shipping method this tax line belongs to.
* total:
* type: number
* title: total
* description: The shipping method's total including taxes and promotions.
* subtotal:
* type: number
* title: subtotal
* description: The shipping method's total excluding taxes, including promotions.
* id:
* type: string
* title: id
* description: The tax line's ID.
* description:
* type: string
* title: description
* description: The tax line's description.
* tax_rate_id:
* type: string
* title: tax_rate_id
* description: The ID of the applied tax rate.
* code:
* type: string
* title: code
* description: The code that the tax rate is identified by.
* rate:
* type: number
* title: rate
* description: The rate to charge.
* provider_id:
* type: string
* title: provider_id
* description: The ID of the tax provider handling the tax calculation.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the tax line was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the tax line was updated.
* required:
* - shipping_method
* - shipping_method_id
* - total
* - subtotal
* - id
* - code
* - rate
* - created_at
* - updated_at
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema BaseOrderSummary * @schema BaseOrderSummary
* type: object * type: object
* description: The order's summary. * description: The order's summary details.
* x-schemaName: BaseOrderSummary * x-schemaName: BaseOrderSummary
* required: * required:
* - total * - total
@@ -23,35 +23,35 @@
* total: * total:
* type: number * type: number
* title: total * title: total
* description: The summary's total. * description: The order's total including taxes and promotions.
* subtotal: * subtotal:
* type: number * type: number
* title: subtotal * title: subtotal
* description: The summary's subtotal. * description: The order's total excluding taxes, including promotions.
* total_tax: * total_tax:
* type: number * type: number
* title: total_tax * title: total_tax
* description: The summary's total tax. * description: The order's total taxes.
* ordered_total: * ordered_total:
* type: number * type: number
* title: ordered_total * title: ordered_total
* description: The summary's ordered total. * description: The order's total when it was placed.
* fulfilled_total: * fulfilled_total:
* type: number * type: number
* title: fulfilled_total * title: fulfilled_total
* description: The summary's fulfilled total. * description: The total of the fulfilled items of the order.
* returned_total: * returned_total:
* type: number * type: number
* title: returned_total * title: returned_total
* description: The summary's returned total. * description: The total of the order's returned items.
* return_request_total: * return_request_total:
* type: number * type: number
* title: return_request_total * title: return_request_total
* description: The summary's return request total. * description: The total of the items requested to be returned.
* write_off_total: * write_off_total:
* type: number * type: number
* title: write_off_total * title: write_off_total
* description: The summary's write off total. * description: The total of the items removed from the order.
* projected_total: * projected_total:
* type: number * type: number
* title: projected_total * title: projected_total
@@ -75,11 +75,11 @@
* paid_total: * paid_total:
* type: number * type: number
* title: paid_total * title: paid_total
* description: The summary's paid total. * description: The total amount paid.
* refunded_total: * refunded_total:
* type: number * type: number
* title: refunded_total * title: refunded_total
* description: The summary's refunded total. * description: The total amount refunded.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema BaseOrderTransaction * @schema BaseOrderTransaction
* type: object * type: object
* description: The transaction's transactions. * description: An order transaction's details.
* x-schemaName: BaseOrderTransaction * x-schemaName: BaseOrderTransaction
* required: * required:
* - id * - id
@@ -21,7 +21,7 @@
* order_id: * order_id:
* type: string * type: string
* title: order_id * title: order_id
* description: The transaction's order id. * description: The ID of the order this transaction belongs to.
* amount: * amount:
* type: number * type: number
* title: amount * title: amount
@@ -30,27 +30,31 @@
* type: string * type: string
* title: currency_code * title: currency_code
* description: The transaction's currency code. * description: The transaction's currency code.
* example: usd
* reference: * reference:
* type: string * type: string
* title: reference * title: reference
* description: The transaction's reference. * description: The name of a table that this transaction references. If this transaction is for captured payment, its value is `capture`. If this transaction is for refunded payment, its value is `refund`.
* enum:
* - capture
* - refund
* reference_id: * reference_id:
* type: string * type: string
* title: reference_id * title: reference_id
* description: The transaction's reference id. * description: The ID of the referenced record in the referenced table.
* metadata: * metadata:
* type: object * type: object
* description: The transaction's metadata. * description: The transaction's metadata, can hold custom key-value pairs.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The transaction's created at. * description: The date that the transaction was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The transaction's updated at. * description: The date that the transaction was updated.
* *
*/ */
@@ -1,8 +1,97 @@
/** /**
* @schema BasePayment * @schema BasePayment
* type: object * type: object
* description: The payment's payments. * description: The payment's details.
* x-schemaName: BasePayment * x-schemaName: BasePayment
* required:
* - id
* - amount
* - currency_code
* - provider_id
* properties:
* id:
* type: string
* title: id
* description: The payment's ID.
* amount:
* type: number
* title: amount
* description: The payment's amount.
* authorized_amount:
* type: number
* title: authorized_amount
* description: The amount authorized of the payment.
* currency_code:
* type: string
* title: currency_code
* description: The payment's currency code.
* provider_id:
* type: string
* title: provider_id
* description: The ID of the payment provider used to process this payment.
* cart_id:
* type: string
* title: cart_id
* description: The ID of the associated cart.
* order_id:
* type: string
* title: order_id
* description: The ID of the associated order.
* order_edit_id:
* type: string
* title: order_edit_id
* description: The ID of the associated order edit.
* customer_id:
* type: string
* title: customer_id
* description: ID of the associated customer.
* data:
* type: object
* description: The payment's data, useful for processing by the payment provider.
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment#whats-a-payment
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the payment was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the payment was updated.
* captured_at:
* type: string
* format: date-time
* title: captured_at
* description: The date the payment was captured.
* canceled_at:
* type: string
* format: date-time
* title: canceled_at
* description: The date the payment was canceled.
* captured_amount:
* type: number
* title: captured_amount
* description: The captured amount of the payment.
* refunded_amount:
* type: number
* title: captured_amount
* description: The refunded amount of the payment.
* captures:
* type: array
* description: The details of payment captures.
* items:
* $ref: "#/components/schemas/BaseCapture"
* refunds:
* type: array
* description: The details of payment refunds.
* items:
* $ref: "#/components/schemas/BaseRefund"
* payment_collection:
* $ref: "#/components/schemas/BasePaymentCollection"
* payment_session:
* $ref: "#/components/schemas/BasePaymentSession"
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema BasePaymentCollection * @schema BasePaymentCollection
* type: object * type: object
* description: The payment collection's payment collections. * description: The payment collection's details.
* x-schemaName: BasePaymentCollection * x-schemaName: BasePaymentCollection
* required: * required:
* - id * - id
@@ -22,77 +22,41 @@
* region_id: * region_id:
* type: string * type: string
* title: region_id * title: region_id
* description: The payment collection's region id. * description: The ID of the region this payment collection is associated with.
* amount: * amount:
* oneOf: * type: number
* - type: string * title: amount
* title: amount * description: The total amount to be paid.
* description: The payment collection's amount.
* - type: number
* title: amount
* description: The payment collection's amount.
* - type: string
* title: amount
* description: The payment collection's amount.
* - $ref: "#/components/schemas/IBigNumber"
* authorized_amount: * authorized_amount:
* oneOf: * type: number
* - type: string * title: authorized_amount
* title: authorized_amount * description: The total authorized amount of the collection's payments.
* description: The payment collection's authorized amount.
* - type: number
* title: authorized_amount
* description: The payment collection's authorized amount.
* - type: string
* title: authorized_amount
* description: The payment collection's authorized amount.
* - $ref: "#/components/schemas/IBigNumber"
* captured_amount: * captured_amount:
* oneOf: * type: number
* - type: string * title: captured_amount
* title: captured_amount * description: The total captured amount of the collection's payments.
* description: The payment collection's captured amount.
* - type: number
* title: captured_amount
* description: The payment collection's captured amount.
* - type: string
* title: captured_amount
* description: The payment collection's captured amount.
* - $ref: "#/components/schemas/IBigNumber"
* refunded_amount: * refunded_amount:
* oneOf: * type: number
* - type: string * title: refunded_amount
* title: refunded_amount * description: The total refunded amount of the collection's payments.
* description: The payment collection's refunded amount.
* - type: number
* title: refunded_amount
* description: The payment collection's refunded amount.
* - type: string
* title: refunded_amount
* description: The payment collection's refunded amount.
* - $ref: "#/components/schemas/IBigNumber"
* completed_at: * completed_at:
* oneOf: * type: string
* - type: string * format: date-time
* title: completed_at * title: completed_at
* description: The payment collection's completed at. * description: The date the payment collection was completed.
* - type: string
* title: completed_at
* description: The payment collection's completed at.
* format: date-time
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The payment collection's created at. * description: The date the payment collection was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The payment collection's updated at. * description: The date the payment collection was updated.
* metadata: * metadata:
* type: object * type: object
* description: The payment collection's metadata. * description: The payment collection's metadata, can hold custom key-value pairs.
* status: * status:
* type: string * type: string
* description: The payment collection's status. * description: The payment collection's status.
@@ -104,7 +68,7 @@
* - partially_authorized * - partially_authorized
* payment_providers: * payment_providers:
* type: array * type: array
* description: The payment collection's payment providers. * description: The payment provider used to process the collection's payments and sessions.
* items: * items:
* $ref: "#/components/schemas/BasePaymentProvider" * $ref: "#/components/schemas/BasePaymentProvider"
* payment_sessions: * payment_sessions:
@@ -3,6 +3,18 @@
* type: object * type: object
* description: The payment provider's payment providers. * description: The payment provider's payment providers.
* x-schemaName: BasePaymentProvider * x-schemaName: BasePaymentProvider
* required:
* - is_enabled
* - id
* properties:
* id:
* type: string
* title: id
* description: The payment provider's ID.
* is_enabled:
* type: boolean
* title: is_enabled
* description: Whether the payment provider is enabled.
* *
*/ */
@@ -1,8 +1,63 @@
/** /**
* @schema BasePaymentSession * @schema BasePaymentSession
* type: object * type: object
* description: The payment session's payment sessions. * description: The payment session's details.
* x-schemaName: BasePaymentSession * x-schemaName: BasePaymentSession
* properties:
* id:
* type: string
* title: id
* description: The payment session's ID.
* amount:
* type: number
* title: amount
* description: The payment session's amount.
* currency_code:
* type: string
* title: currency_code
* description: The payment session's currency code.
* example: usd
* provider_id:
* type: string
* title: provider_id
* description: The ID of the payment provider processing this session.
* data:
* type: object
* description: The payment session's data, useful for the payment provider processing the payment.
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment-session#data-property
* context:
* type: object
* description: The context around the payment, such as the customer's details.
* example:
* customer:
* id: cus_123
* status:
* type: string
* description: The payment session's status.
* enum:
* - authorized
* - captured
* - canceled
* - pending
* - requires_more
* - error
* authorized_at:
* type: string
* title: authorized_at
* description: The date the payment session was authorized.
* format: date-time
* payment_collection:
* $ref: "#/components/schemas/BasePaymentCollection"
* payment:
* $ref: "#/components/schemas/BasePayment"
* required:
* - id
* - amount
* - currency_code
* - provider_id
* - data
* - status
* *
*/ */
@@ -1,8 +1,38 @@
/** /**
* @schema BaseProductImage * @schema BaseProductImage
* type: object * type: object
* description: The image's images. * description: The image's details.
* x-schemaName: BaseProductImage * x-schemaName: BaseProductImage
* properties:
* id:
* type: string
* title: id
* description: The image's ID.
* url:
* type: string
* title: url
* description: The image's URL.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the image was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the image was updated.
* deleted_at:
* type: string
* format: date-time
* title: deleted_at
* description: The date the image was deleted.
* metadata:
* type: object
* description: The image's metadata, can hold custom key-value pairs.
* required:
* - id
* - url
* *
*/ */
@@ -1,8 +1,49 @@
/** /**
* @schema BaseProductOption * @schema BaseProductOption
* type: object * type: object
* description: The option's options. * description: The product option's details.
* x-schemaName: BaseProductOption * x-schemaName: BaseProductOption
* properties:
* id:
* type: string
* title: id
* description: The option's ID.
* title:
* type: string
* title: title
* description: The option's title.
* product:
* $ref: "#/components/schemas/BaseProduct"
* product_id:
* type: string
* title: product_id
* description: The option's product id.
* values:
* type: array
* description: The option's values.
* items:
* $ref: "#/components/schemas/BaseProductOptionValue"
* metadata:
* type: object
* description: The option's metadata.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The option's created at.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The option's updated at.
* deleted_at:
* type: string
* format: date-time
* title: deleted_at
* description: The option's deleted at.
* required:
* - id
* - title
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema BaseProductOptionValue * @schema BaseProductOptionValue
* type: object * type: object
* description: The option's options. * description: The product option value's details.
* x-schemaName: BaseProductOptionValue * x-schemaName: BaseProductOptionValue
* required: * required:
* - id * - id
@@ -10,35 +10,35 @@
* id: * id:
* type: string * type: string
* title: id * title: id
* description: The option's ID. * description: The value's ID.
* value: * value:
* type: string * type: string
* title: value * title: value
* description: The option's value. * description: The value.
* option: * option:
* $ref: "#/components/schemas/BaseProductOption" * $ref: "#/components/schemas/BaseProductOption"
* option_id: * option_id:
* type: string * type: string
* title: option_id * title: option_id
* description: The option's option id. * description: The ID of the option this value belongs to.
* metadata: * metadata:
* type: object * type: object
* description: The option's metadata. * description: The value's metadata, can hold custom key-value pairs.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The option's created at. * description: The date the value was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The option's updated at. * description: The date the value was updated.
* deleted_at: * deleted_at:
* type: string * type: string
* format: date-time * format: date-time
* title: deleted_at * title: deleted_at
* description: The option's deleted at. * description: The date the value was deleted.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema BasePromotionRuleValue * @schema BasePromotionRuleValue
* type: object * type: object
* description: The value's values. * description: The rule value's details.
* x-schemaName: BasePromotionRuleValue * x-schemaName: BasePromotionRuleValue
* required: * required:
* - id * - id
@@ -13,7 +13,7 @@
* value: * value:
* type: string * type: string
* title: value * title: value
* description: The value's details. * description: The value.
* *
*/ */
@@ -1,8 +1,41 @@
/** /**
* @schema BaseRefund * @schema BaseRefund
* type: object * type: object
* description: The refund's refunds. * description: The refund's details.
* x-schemaName: BaseRefund * x-schemaName: BaseRefund
* required:
* - id
* - amount
* - created_at
* - payment
* properties:
* id:
* type: string
* title: id
* description: The refund's ID.
* amount:
* type: number
* title: amount
* description: The refund's amount.
* refund_reason_id:
* type: string
* title: refund_reason_id
* description: The ID of the refund reason.
* note:
* type: string
* title: note
* description: More details about the refund.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the refund was created.
* created_by:
* type: string
* title: created_by
* description: The ID of the user that created the refund.
* payment:
* $ref: "#/components/schemas/BasePayment"
* *
*/ */
@@ -1,8 +1,38 @@
/** /**
* @schema BaseRegionCountry * @schema BaseRegionCountry
* type: object * type: object
* description: The country's countries. * description: The country's details.
* x-schemaName: BaseRegionCountry * x-schemaName: BaseRegionCountry
* properties:
* id:
* type: string
* title: id
* description: The country's ID.
* iso_2:
* type: string
* title: iso_2
* description: The country's iso 2.
* example: us
* iso_3:
* type: string
* title: iso_3
* description: The country's iso 3.
* example: usa
* num_code:
* type: string
* title: num_code
* description: The country's num code.
* example: 840
* name:
* type: string
* title: name
* description: The country's name.
* display_name:
* type: string
* title: display_name
* description: The country's display name.
* required:
* - id
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema BaseRuleOperatorOptions * @schema BaseRuleOperatorOptions
* type: object * type: object
* description: The operator's operators. * description: The operator's details.
* x-schemaName: BaseRuleOperatorOptions * x-schemaName: BaseRuleOperatorOptions
* required: * required:
* - id * - id
@@ -12,14 +12,17 @@
* type: string * type: string
* title: id * title: id
* description: The operator's ID. * description: The operator's ID.
* example: "in"
* value: * value:
* type: string * type: string
* title: value * title: value
* description: The operator's value. * description: The operator's value.
* example: "in"
* label: * label:
* type: string * type: string
* title: label * title: label
* description: The operator's label. * description: The operator's label.
* example: "In"
* *
*/ */
@@ -1,8 +1,61 @@
/** /**
* @schema BaseShippingMethodAdjustment * @schema BaseShippingMethodAdjustment
* type: object * type: object
* description: The adjustment's adjustments. * description: The adjustment's details.
* x-schemaName: BaseShippingMethodAdjustment * x-schemaName: BaseShippingMethodAdjustment
* required:
* - shipping_method
* - shipping_method_id
* - id
* - amount
* - cart_id
* - created_at
* - updated_at
* properties:
* shipping_method:
* $ref: "#/components/schemas/BaseCartShippingMethod"
* shipping_method_id:
* type: string
* title: shipping_method_id
* description: The ID of the shipping method the adjustment is applied on.
* id:
* type: string
* title: id
* description: The adjustment's ID.
* code:
* type: string
* title: code
* description: The adjustment's code.
* amount:
* type: number
* title: amount
* description: The adjustment's amount.
* cart_id:
* type: string
* title: cart_id
* description: The ID of the associated cart.
* description:
* type: string
* title: description
* description: The adjustment's description.
* promotion_id:
* type: string
* title: promotion_id
* description: The ID of the promotion applied by this adjustment.
* provider_id:
* type: string
* title: provider_id
* description: The adjustment's provider ID.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the adjustment was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the adjustment was updated.
* *
*/ */
@@ -1,8 +1,67 @@
/** /**
* @schema BaseShippingMethodTaxLine * @schema BaseShippingMethodTaxLine
* type: object * type: object
* description: The tax line's tax lines. * description: The tax line's details.
* x-schemaName: BaseShippingMethodTaxLine * x-schemaName: BaseShippingMethodTaxLine
* required:
* - shipping_method
* - shipping_method_id
* - total
* - subtotal
* - id
* - code
* - rate
* - created_at
* - updated_at
* properties:
* shipping_method:
* $ref: "#/components/schemas/BaseCartShippingMethod"
* shipping_method_id:
* type: string
* title: shipping_method_id
* description: The ID of this shipping method the tax line belongs to.
* total:
* type: number
* title: total
* description: The method's total including taxes and promotions.
* subtotal:
* type: number
* title: subtotal
* description: The method's total excluding taxes, including promotions.
* id:
* type: string
* title: id
* description: The tax line's ID.
* description:
* type: string
* title: description
* description: The tax line's description.
* tax_rate_id:
* type: string
* title: tax_rate_id
* description: The ID of the applied tax rate.
* code:
* type: string
* title: code
* description: The code that the rate is identified by.
* rate:
* type: number
* title: rate
* description: The rate to charge.
* provider_id:
* type: string
* title: provider_id
* description: The ID of the tax provider that calculated the taxes.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the tax line was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the tax line was updated.
* *
*/ */
@@ -1,56 +1,57 @@
/** /**
* @schema CreateAddress * @schema CreateAddress
* type: object * type: object
* description: The cart's shipping address. * description: The cart's address details.
* x-schemaName: CreateAddress * x-schemaName: CreateAddress
* properties: * properties:
* customer_id: * customer_id:
* type: string * type: string
* title: customer_id * title: customer_id
* description: The shipping address's customer id. * description: The ID of the customer this address belongs to.
* company: * company:
* type: string * type: string
* title: company * title: company
* description: The shipping address's company. * description: The address's company.
* first_name: * first_name:
* type: string * type: string
* title: first_name * title: first_name
* description: The shipping address's first name. * description: The address's first name.
* last_name: * last_name:
* type: string * type: string
* title: last_name * title: last_name
* description: The shipping address's last name. * description: The address's last name.
* address_1: * address_1:
* type: string * type: string
* title: address_1 * title: address_1
* description: The shipping address's address 1. * description: The address's first line.
* address_2: * address_2:
* type: string * type: string
* title: address_2 * title: address_2
* description: The shipping address's address 2. * description: The address's second line.
* city: * city:
* type: string * type: string
* title: city * title: city
* description: The shipping address's city. * description: The address's city.
* country_code: * country_code:
* type: string * type: string
* title: country_code * title: country_code
* description: The shipping address's country code. * description: The address's country code.
* example: us
* province: * province:
* type: string * type: string
* title: province * title: province
* description: The shipping address's province. * description: The address's province.
* postal_code: * postal_code:
* type: string * type: string
* title: postal_code * title: postal_code
* description: The shipping address's postal code. * description: The address's postal code.
* phone: * phone:
* type: string * type: string
* title: phone * title: phone
* description: The shipping address's phone. * description: The address's phone.
* metadata: * metadata:
* type: object * type: object
* description: The shipping address's metadata. * description: The address's metadata, can hold custom key-value pairs.
* *
*/ */