---
displayed_sidebar: servicesSidebar
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# MoneyAmount

A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region.

## Constructors

### constructor

`**new MoneyAmount**()`

A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region.

## Properties

<ParameterTypes parameters={[
  {
    "name": "amount",
    "type": "`number`",
    "description": "The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.",
    "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": "currency",
    "type": "[Currency](Currency.mdx)",
    "description": "The details of the currency that the money amount may belong to.",
    "optional": true,
    "defaultValue": "",
    "expandable": true,
    "children": []
  },
  {
    "name": "currency_code",
    "type": "`string`",
    "description": "The 3 character currency code that the money amount may belong to.",
    "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": "id",
    "type": "`string`",
    "description": "The money amount's ID",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "max_quantity",
    "type": "`null` \\| `number`",
    "description": "The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "min_quantity",
    "type": "`null` \\| `number`",
    "description": "The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "price_list",
    "type": "`null` \\| [PriceList](PriceList.mdx)",
    "description": "The details of the price list that the money amount may belong to.",
    "optional": false,
    "defaultValue": "",
    "expandable": true,
    "children": []
  },
  {
    "name": "price_list_id",
    "type": "`null` \\| `string`",
    "description": "The ID of the price list that the money amount may belong to.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "region",
    "type": "[Region](Region.mdx)",
    "description": "The details of the region that the money amount may belong to.",
    "optional": true,
    "defaultValue": "",
    "expandable": true,
    "children": []
  },
  {
    "name": "region_id",
    "type": "`string`",
    "description": "The region's ID",
    "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": []
  },
  {
    "name": "variant",
    "type": "[ProductVariant](ProductVariant.mdx)",
    "description": "The details of the product variant that the money amount may belong to.",
    "optional": false,
    "defaultValue": "",
    "expandable": true,
    "children": []
  },
  {
    "name": "variant_id",
    "type": "`string`",
    "description": "The ID of the Product Variant contained in the Line Item.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "variants",
    "type": "[ProductVariant](ProductVariant.mdx)[]",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  }
]} />

## Methods

### afterLoad

`Private **afterLoad**(): void`

#### Returns

`void`

<ParameterTypes parameters={[
  {
    "name": "void",
    "type": "`void`",
    "optional": true,
    "defaultValue": "",
    "description": "",
    "expandable": false,
    "children": []
  }
]} />

___

### beforeInsert

`Private **beforeInsert**(): undefined \| void`

#### Returns

`undefined` \| `void`

<ParameterTypes parameters={[
  {
    "name": "undefined \\| void",
    "type": "`undefined` \\| `void`",
    "optional": true,
    "defaultValue": "",
    "description": "",
    "expandable": false,
    "children": []
  }
]} />

___

### beforeUpdate

`Private **beforeUpdate**(): void`

#### Returns

`void`

<ParameterTypes parameters={[
  {
    "name": "void",
    "type": "`void`",
    "optional": true,
    "defaultValue": "",
    "description": "",
    "expandable": false,
    "children": []
  }
]} />
