Skip to content

Commit

Permalink
Added metadata field
Browse files Browse the repository at this point in the history
  • Loading branch information
sandervanhooft committed Jan 6, 2025
1 parent 52650a2 commit 37a8a17
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Order/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
* @property \Carbon\Carbon|null processed_at
* @property int amount_refunded
* @property int amount_charged_back
* @property array|null metadata
* @property \Laravel\Cashier\Order\OrderItemCollection items
* @property \Laravel\Cashier\Refunds\RefundCollection refunds
*
Expand All @@ -72,6 +73,7 @@ class Order extends Model
'credit_used' => 'int',
'total_due' => 'int',
'processed_at' => 'datetime',
'metadata' => 'array',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
Expand Down
2 changes: 2 additions & 0 deletions src/Order/OrderItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* @property mixed $id
* @property Order $order
* @property mixed $order_id
* @property array|null metadata
*
* @method static create(array $array)
* @method static make(array $array)
Expand All @@ -47,6 +48,7 @@ class OrderItem extends Model implements InvoicableItem
'tax_percentage' => 'float',
'orderable_id' => 'int',
'process_at' => 'datetime',
'metadata' => 'array',
];

protected $guarded = [];
Expand Down
2 changes: 2 additions & 0 deletions src/Refunds/Refund.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* @property \Laravel\Cashier\Refunds\RefundItemCollection items
* @property Order order
* @property Order originalOrder
* @property array|null metadata
*/
class Refund extends Model
{
Expand All @@ -37,6 +38,7 @@ class Refund extends Model

protected $casts = [
'total' => 'int',
'metadata' => 'array',
];

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Refunds/RefundItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @property string description
* @property array<string> description_extra_lines
* @property OrderItem originalOrderItem
* @property array|null metadata
*
* @method static create(array $array)
* @method static make(array $array)
Expand All @@ -45,6 +46,7 @@ class RefundItem extends Model
'subtotal' => 'int',
'tax' => 'int',
'total' => 'int',
'metadata' => 'array',
];

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
* @property float cycle_progress
* @property float cycle_left
* @property string $currency
* @property array|null metadata
*/
class Subscription extends Model implements InteractsWithOrderItems, PreprocessesOrderItems, AcceptsCoupons, IsRefundable
{
Expand All @@ -67,6 +68,7 @@ class Subscription extends Model implements InteractsWithOrderItems, Preprocesse
'cycle_started_at' => 'datetime',
'cycle_ends_at' => 'datetime',
'ends_at' => 'datetime',
'metadata' => 'array',
];

/**
Expand Down

0 comments on commit 37a8a17

Please sign in to comment.