Skip to content

Commit

Permalink
remove LinkOpen
Browse files Browse the repository at this point in the history
  • Loading branch information
hwjeremy committed Jan 21, 2021
1 parent a462a57 commit 626e7a8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
18 changes: 6 additions & 12 deletions ProcuretAPI/src/InstalmentLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,21 @@ public struct InstalmentLink
public readonly Decimal InvoiceAmount;
public readonly String InvoiceIdentifier;
public readonly String InviteeEmail;
public readonly LinkOpen[] Opens;

internal InstalmentLink(
String publicId,
EntityHeadline supplier,
String inviteeEmail,
Decimal invoiceAmount,
String invoiceIdentifier,
LinkOpen[] linkOpens
String invoiceIdentifier
)
{
this.PublicId = publicId;
this.Supplier = supplier;
this.InviteeEmail = inviteeEmail;
this.InvoiceAmount = invoiceAmount;
this.InvoiceIdentifier = invoiceIdentifier;
this.Opens = linkOpens;

return;
}

Expand All @@ -56,7 +54,7 @@ Session session
}

String stringSupplierId = supplierId.ToString();
String stringInvoiceValue = invoiceValue.ToString();
String stringInvoiceValue = Math.Round(invoiceValue, 2).ToString();

CreatePayload payload = new CreatePayload(
stringSupplierId,
Expand All @@ -82,8 +80,7 @@ Session session
decodePayload.supplier,
decodePayload.invitee_email,
Convert.ToDecimal(decodePayload.invoice_amount),
decodePayload.invoice_identifier,
decodePayload.opens
decodePayload.invoice_identifier
);

return link;
Expand Down Expand Up @@ -142,13 +139,13 @@ public static async Task<InstalmentLink[]> RetrieveMany(

foreach (InstalmentLink.DecodePayload link in decodePayload)
{

resultList.Add(new InstalmentLink(
link.public_id,
link.supplier,
link.invitee_email,
Convert.ToDecimal(link.invoice_amount),
link.invoice_identifier,
link.opens
link.invoice_identifier
));
continue;
}
Expand Down Expand Up @@ -210,9 +207,6 @@ internal class DecodePayload
[DataMember]
internal readonly String invoice_identifier;

[DataMember]
internal readonly LinkOpen[] opens;

}
}
}
12 changes: 0 additions & 12 deletions ProcuretAPI/src/LinkOpen.cs

This file was deleted.

6 changes: 5 additions & 1 deletion ProcuretAPI_Tests/InstalmentLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ public async Task TestListInstalmentLink()
session: this.Session
);

Assert.True(links.Length > 0, "Actual length: " + links.Length.ToString());
Assert.True(
links.Length > 0,
"Actual length: " + links.Length.ToString()
);


return;

Expand Down

0 comments on commit 626e7a8

Please sign in to comment.