-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: regenerated with OpenAPI Doc prealpha, Speakeay CLI 1.83.2 (#60)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
- Loading branch information
1 parent
bac3411
commit 688f622
Showing
60 changed files
with
1,332 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountingAddressType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost when | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
#nullable enable | ||
namespace CodatSyncExpenses.Models.Shared | ||
{ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
|
||
/// <summary> | ||
/// The type of the address | ||
/// </summary> | ||
public enum AccountingAddressType | ||
{ | ||
[JsonProperty("Unknown")] | ||
Unknown, | ||
[JsonProperty("Billing")] | ||
Billing, | ||
[JsonProperty("Delivery")] | ||
Delivery, | ||
} | ||
|
||
public static class AccountingAddressTypeExtension | ||
{ | ||
public static string Value(this AccountingAddressType value) | ||
{ | ||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); | ||
} | ||
|
||
public static AccountingAddressType ToEnum(this string value) | ||
{ | ||
foreach(var field in typeof(AccountingAddressType).GetFields()) | ||
{ | ||
var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; | ||
if (attribute != null && attribute.PropertyName == value) | ||
{ | ||
var enumVal = field.GetValue(null); | ||
|
||
if (enumVal is AccountingAddressType) | ||
{ | ||
return (AccountingAddressType)enumVal; | ||
} | ||
} | ||
} | ||
|
||
throw new Exception($"Unknown value {value} for enum AccountingAddressType"); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
sync-for-expenses/CodatSyncExpenses/Models/Shared/Contact.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
|
||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost when | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
#nullable enable | ||
namespace CodatSyncExpenses.Models.Shared | ||
{ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
|
||
public class Contact | ||
{ | ||
[JsonProperty("address")] | ||
public Items? Address { get; set; } | ||
|
||
/// <summary> | ||
/// Email of a contact for a customer. | ||
/// </summary> | ||
[JsonProperty("email")] | ||
public string? Email { get; set; } | ||
|
||
/// <summary> | ||
/// In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example: | ||
/// | ||
/// <remarks> | ||
/// | ||
/// ``` | ||
/// 2020-10-08T22:40:50Z | ||
/// 2021-01-01T00:00:00 | ||
/// ``` | ||
/// | ||
/// | ||
/// | ||
/// When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: | ||
/// | ||
/// - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` | ||
/// - Unqualified local time: `2021-11-15T01:00:00` | ||
/// - UTC time offsets: `2021-11-15T01:00:00-05:00` | ||
/// | ||
/// > Time zones | ||
/// > | ||
/// > Not all dates from Codat will contain information about time zones. | ||
/// > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | ||
/// </remarks> | ||
/// </summary> | ||
[JsonProperty("modifiedDate")] | ||
public string? ModifiedDate { get; set; } | ||
|
||
/// <summary> | ||
/// Name of a contact for a customer. | ||
/// </summary> | ||
[JsonProperty("name")] | ||
public string? Name { get; set; } | ||
|
||
/// <summary> | ||
/// An array of Phone numbers. | ||
/// </summary> | ||
[JsonProperty("phone")] | ||
public List<ContactPhone>? Phone { get; set; } | ||
|
||
/// <summary> | ||
/// Status of customer. | ||
/// </summary> | ||
[JsonProperty("status")] | ||
public CustomerStatus Status { get; set; } = default!; | ||
|
||
} | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
sync-for-expenses/CodatSyncExpenses/Models/Shared/ContactPhone.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost when | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
#nullable enable | ||
namespace CodatSyncExpenses.Models.Shared | ||
{ | ||
using Newtonsoft.Json; | ||
|
||
|
||
public class ContactPhone | ||
{ | ||
/// <summary> | ||
/// A phone number. | ||
/// </summary> | ||
[JsonProperty("number")] | ||
public string Number { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// The type of phone number | ||
/// </summary> | ||
[JsonProperty("type")] | ||
public PhoneNumberType Type { get; set; } = default!; | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.