Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing Endpoint Message #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Billbee.Api.Client/Endpoint/Interfaces/IOrderEndPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,14 @@ ApiResult<List<InvoiceDetail>> GetInvoiceList(
/// <param name="parsePlaceholdersQuery">The text to be parsed</param>
/// <returns>The parsed text</returns>
ParsePlaceholdersResult ParsePlaceholders(long orderId, ParsePlaceholdersQuery parsePlaceholdersQuery);


/// <summary>
/// Adds a message to the specified order
/// </summary>
/// <param name="orderId">The id of the order to add the message</param>
/// <param name="orderMessage">The content of the Order-Message</param>
void AddMessage(long orderId, OrderMessage orderMessage);

}
}
8 changes: 8 additions & 0 deletions Billbee.Api.Client/Endpoint/OrderEndPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,5 +287,13 @@ public ParsePlaceholdersResult ParsePlaceholders(long orderId, ParsePlaceholders
{
return _restClient.Post<ParsePlaceholdersResult>($"/orders/{orderId}/parse-placeholders", parsePlaceholdersQuery);
}


[ApiMapping("/api/v1/orders/{id}/message", HttpOperation.Post)]
public void AddMessage(long orderId, OrderMessage orderMessage)
{
_restClient.Post($"/orders/{orderId}/message", orderMessage);
}

}
}
24 changes: 24 additions & 0 deletions Billbee.Api.Client/Model/OrderMessage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Billbee.Api.Client.Model
{
public class OrderMessage
{
/// <summary>
/// Sets the message as internal if true
/// </summary>
public bool IsInternal { get; set; }

/// <summary>
/// The name of the sender
/// </summary>
public string SenderName { get; set; }

/// <summary>
/// The text of the message
/// </summary>
public string Text { get; set; }
}
}