Files
medusa-store/www/apps/docs/content/references/services/classes/PaymentCollection.mdx
github-actions[bot] cdd42dbdcd chore(docs): Generated References (#5743)
Generated the following references:
- `entities`
- `inventory`
- `js-client`
- `pricing`
- `product`
- `services`
- `stock-location`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-11-27 18:58:52 +00:00

198 lines
4.8 KiB
Plaintext

---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# PaymentCollection
A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments.
## Constructors
#### constructor
`**new PaymentCollection**()`
A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments.
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "Amount of the payment collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "authorized_amount",
"type": "`null` \\| `number`",
"description": "Authorized amount of the payment collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_by",
"type": "`string`",
"description": "The ID of the user that created the payment collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "currency",
"type": "[Currency](Currency.mdx)",
"description": "The details of the currency this payment collection is associated with.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "currency_code",
"type": "`string`",
"description": "The three character ISO code for the currency this payment collection is associated with.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`null` \\| `string`",
"description": "Description of the payment collection",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The payment collection's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment_sessions",
"type": "[PaymentSession](PaymentSession.mdx)[]",
"description": "The details of the payment sessions created as part of the payment collection.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "payments",
"type": "[Payment](Payment.mdx)[]",
"description": "The details of the payments created as part of the payment collection.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region",
"type": "[Region](Region.mdx)",
"description": "The details of the region this payment collection is associated with.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region_id",
"type": "`string`",
"description": "The ID of the region this payment collection is associated with.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[PaymentCollectionStatus](../enums/PaymentCollectionStatus.mdx)",
"description": "The type of the payment collection",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[ORDER_EDIT](../index.md#order_edit)",
"description": "The type of the payment collection",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
## Methods
#### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />