From d6634865427b0f61a264dea8864c00e85abf4962 Mon Sep 17 00:00:00 2001 From: Gering112 <45523369+Gering112@users.noreply.github.com> Date: Thu, 23 Mar 2023 16:27:38 -0400 Subject: [PATCH] * AccommodationLineItem.cs: * LineItem.cs: added recipient property into line items obj and accommodation constructor --- Riskified.SDK/Model/OrderElements/AccommodationLineItem.cs | 3 ++- Riskified.SDK/Model/OrderElements/LineItem.cs | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Riskified.SDK/Model/OrderElements/AccommodationLineItem.cs b/Riskified.SDK/Model/OrderElements/AccommodationLineItem.cs index 8366bd6..ec82fad 100644 --- a/Riskified.SDK/Model/OrderElements/AccommodationLineItem.cs +++ b/Riskified.SDK/Model/OrderElements/AccommodationLineItem.cs @@ -28,6 +28,7 @@ public AccommodationLineItem( DeliveredToType? deliveredTo = null, DateTime? deliveredAt = null, Policy policy = null, + Recipient recipient = null, // accommodation specific string roomType = null, string city = null, @@ -40,7 +41,7 @@ public AccommodationLineItem( string accommodationType = null ) : base(title: title, price: price, quantityPurchased: quantityPurchased, productId: productId, sku: sku, condition: condition, requiresShipping: requiresShipping, seller: seller, deliveredTo: deliveredTo, delivered_at: deliveredAt, - category: category, subCategory: subCategory, brand: brand, productType: OrderElements.ProductType.Accommodation, policy: policy) + category: category, subCategory: subCategory, brand: brand, productType: OrderElements.ProductType.Accommodation, policy: policy, recipient: recipient) { RoomType = roomType; City = city; diff --git a/Riskified.SDK/Model/OrderElements/LineItem.cs b/Riskified.SDK/Model/OrderElements/LineItem.cs index ae9499b..25a099d 100644 --- a/Riskified.SDK/Model/OrderElements/LineItem.cs +++ b/Riskified.SDK/Model/OrderElements/LineItem.cs @@ -32,7 +32,8 @@ public LineItem(string title, string category = null, string subCategory = null, Policy policy = null, - RegistryType? registryType = null) + RegistryType? registryType = null, + Recipient recipient= null) { Title = title; @@ -53,6 +54,7 @@ public LineItem(string title, Brand = brand; Policy = policy; RegistryType = registryType; + Recipient = recipient; } /// @@ -169,5 +171,8 @@ public virtual void Validate(Validations validationType = Validations.Weak) [JsonProperty(PropertyName = "registry_type")] [JsonConverter(typeof (StringEnumConverter))] public RegistryType? RegistryType { get; set; } + + [JsonProperty(PropertyName = "recipient")] + public Recipient Recipient { get; set; } } }