Skip to content

Commit

Permalink
* AccommodationLineItem.cs:
Browse files Browse the repository at this point in the history
* LineItem.cs: added recipient property into line items obj and
  accommodation constructor
  • Loading branch information
Gering112 committed Mar 23, 2023
1 parent f25391e commit d663486
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Riskified.SDK/Model/OrderElements/AccommodationLineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down
7 changes: 6 additions & 1 deletion Riskified.SDK/Model/OrderElements/LineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -53,6 +54,7 @@ public LineItem(string title,
Brand = brand;
Policy = policy;
RegistryType = registryType;
Recipient = recipient;
}

/// <summary>
Expand Down Expand Up @@ -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; }
}
}

0 comments on commit d663486

Please sign in to comment.