Merge pull request #3353 from Haendlerbund/expose-downloadable-links

feature: expose downloadable links
This commit is contained in:
Jitendra Singh 2020-06-25 12:25:20 +05:30 committed by GitHub
commit 549c0e38d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -100,10 +100,11 @@ class Order extends JsonResource
'channel' => $this->when($this->channel_id, new ChannelResource($this->channel)),
'shipping_address' => new OrderAddress($this->shipping_address),
'billing_address' => new OrderAddress($this->billing_address),
'updated_at' => $this->updated_at,
'items' => OrderItem::collection($this->items),
'invoices' => Invoice::collection($this->invoices),
'shipments' => Shipment::collection($this->shipments),
'downloadable_links' => $this->downloadable_link_purchased,
'updated_at' => $this->updated_at,
'created_at' => $this->created_at,
];
}

View File

@ -213,6 +213,8 @@ class OrderItem extends Model implements OrderItemContract
$array['qty_to_refund'] = $this->qty_to_refund;
$array['downloadable_links'] = $this->downloadable_link_purchased;
return $array;
}
}