Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Antaris committed Feb 16, 2024
2 parents 96ea0d1 + eedd305 commit fe46832
Show file tree
Hide file tree
Showing 42 changed files with 200 additions and 145 deletions.
2 changes: 1 addition & 1 deletion apps/TrybeSDK.ConsoleSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

string packageJson = package.ToJsonString();

var package2 = package.FromJsonString(packageJson);
var package2 = Package.FromJsonString(packageJson);
}

Console.WriteLine(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ public async Task<TrybeResponse<OfferingDateAvailability[]>> GetOfferingDates(
public class GetOfferingDatesRequest
{
[JsonPropertyName("offering_type")]
public required string OfferingType { get; set; }
public string OfferingType { get; set; }

[JsonPropertyName("offering_id")]
public required string OfferingId { get; set; }
public string OfferingId { get; set; }

[JsonPropertyName("date_from")]
public required DateTime DateFrom { get; set; }
public DateTime DateFrom { get; set; }

[JsonPropertyName("date_to")]
public required DateTime DateTo { get; set; }
public DateTime DateTo { get; set; }

[JsonPropertyName("quantity")]
public required int Quantity { get; set; }
public int Quantity { get; set; }
}
6 changes: 3 additions & 3 deletions libs/TrybeSDK/Api/Shop/Basket/Basket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ public class Basket : Model<Basket>
/// </summary>
/// <value>The ID of the basket.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The order reference of the completed basket.
/// </summary>
/// <value>The order reference of the completed basket.</value>
[JsonPropertyName("order_ref")]
public required string OrderRef { get; set; }
public string OrderRef { get; set; }

/// <summary>
/// The status of the basket (e.g. in progress or complete)
/// </summary>
/// <value>The status of the basket (e.g. in progress or complete)</value>
[JsonPropertyName("status")]
public required string Status { get; set; }
public string Status { get; set; }

/// <summary>
/// The ID of the organisation owning the items to be added to the basket.
Expand Down
2 changes: 1 addition & 1 deletion libs/TrybeSDK/Api/Shop/Basket/BasketCouponSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class BasketCouponSummary : Model<BasketCouponSummary>
/// </summary>
/// <value>The ID of the coupon.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The code of the coupon.
Expand Down
2 changes: 1 addition & 1 deletion libs/TrybeSDK/Api/Shop/Basket/BasketItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class BasketItem : Model<BasketItem>
/// </summary>
/// <value>A unique ID for the basket item</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The type of offering the item represents.
Expand Down
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Basket/BasketItemOptionBudget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public class BasketItemOptionBudget : Model<BasketItemOptionBudget>
/// </summary>
/// <value>The ID of the choice this option budget belongs to.</value>
[JsonPropertyName("choice_id")]
public required string ChoiceId { get; set; }
public string ChoiceId { get; set; }

/// <summary>
/// The amount of the budget, in the smallest denomination.
/// </summary>
/// <value>The amount of the budget, in the smallest denomination.</value>
[JsonPropertyName("budget")]
public required string Budget { get; set; }
public string Budget { get; set; }

/// <summary>
/// The amount spent towards the budget, in the smallest denomination.
Expand Down
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Basket/BasketItemValidity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class BasketItemValidity : Model<BasketItemValidity>
/// </summary>
/// <value>Whether the given basket item is valid.</value>
[JsonPropertyName("valid")]
public required bool? Valid { get; set; }
public bool? Valid { get; set; }

/// <summary>
/// The array of error messages.
Expand All @@ -35,5 +35,5 @@ public class BasketItemValidityErrors : Model<BasketItemValidityErrors>
/// </summary>
/// <value>A friendly description of the error.</value>
[JsonPropertyName("message")]
public required string Message { get; set; }
public string Message { get; set; }
}
6 changes: 3 additions & 3 deletions libs/TrybeSDK/Api/Shop/Basket/BasketOperations.Items.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ public class AddBasketItemRequest
/// The ID of the offering.
/// </summary>
[JsonPropertyName("offering_id")]
public required string OfferingId { get; set; }
public string OfferingId { get; set; }

/// <summary>
/// The type of item being added.
/// </summary>
[JsonPropertyName("offering_type")]
public required string OfferingType { get; set; }
public string OfferingType { get; set; }

/// <summary>
/// The overriden price, if applicable.
Expand Down Expand Up @@ -238,5 +238,5 @@ public class UpdateBasketGuestsRequest
/// The set of guests for the basket.
/// </summary>
[JsonPropertyName("guests")]
public required GuestList Guests { get; set; }
public GuestList Guests { get; set; }
}
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Basket/BasketPackageItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class BasketPackageItem : Model<BasketPackageItem>
/// </summary>
/// <value>A unique ID for the basket package item</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The ID of the package choice this item relates to.
Expand All @@ -36,7 +36,7 @@ public class BasketPackageItem : Model<BasketPackageItem>
/// </summary>
/// <value>The type of offering this item represents.</value>
[JsonPropertyName("offering_type")]
public required string? OfferingType { get; set; }
public string? OfferingType { get; set; }

/// <summary>
/// The ID of the offering this item represents.
Expand Down
2 changes: 1 addition & 1 deletion libs/TrybeSDK/Api/Shop/Basket/BasketPromoCodeSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class BasketPromoCodeSummary : Model<BasketPromoCodeSummary>
/// </summary>
/// <value>The ID of the applied promo code.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The code of the applied promo code.
Expand Down
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Basket/BasketVoucherSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public class BasketVoucherSummary : Model<BasketVoucherSummary>
/// </summary>
/// <value>The ID of the voucher.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The code of the voucher.
/// </summary>
/// <value>The code of the voucher.</value>
[JsonPropertyName("code")]
public required string Code { get; set; }
public string Code { get; set; }

/// <summary>
/// The ID of the voucher type this voucher was created from
Expand Down
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Basket/BookableAreaSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public class BookableAreaSummary : Model<BookableAreaSummary>
/// </summary>
/// <value>The ID of the area.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The name of the area.
/// </summary>
/// <value>The name of the area.</value>
[JsonPropertyName("name")]
public required string Name { get; set; }
public string Name { get; set; }
}
2 changes: 1 addition & 1 deletion libs/TrybeSDK/Api/Shop/Basket/BookingSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class BookingSummary : Model<BookingSummary>
/// Gets or Sets Id
/// </summary>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The date and time the booking starts.
Expand Down
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Basket/EquipmentSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public class EquipmentSummary : Model<EquipmentSummary>
/// </summary>
/// <value>The ID of the equipment.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The name of the equipment.
/// </summary>
/// <value>The name of the equipment.</value>
[JsonPropertyName("name")]
public required string Name { get; set; }
public string Name { get; set; }
}
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Basket/Guest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public class Guest : Model<Guest>
/// </summary>
/// <value>The ID of the guest.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The guest's full name.
/// </summary>
/// <value>The guest's full name.</value>
[JsonPropertyName("name")]
public required string Name { get; set; }
public string Name { get; set; }

/// <summary>
/// Whether this guest is the lead booker
Expand Down
6 changes: 3 additions & 3 deletions libs/TrybeSDK/Api/Shop/Basket/OfferingSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ public class OfferingSummary : Model<OfferingSummary>
/// </summary>
/// <value>The ID of the offering.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The type of the offering.
/// </summary>
/// <value>The type of the offering.</value>
[JsonPropertyName("type")]
public required string Type { get; set; }
public string Type { get; set; }

/// <summary>
/// The name of the offering.
/// </summary>
/// <value>The name of the offering.</value>
[JsonPropertyName("name")]
public required string Name { get; set; }
public string Name { get; set; }
}
2 changes: 1 addition & 1 deletion libs/TrybeSDK/Api/Shop/Basket/PaymentSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class PaymentSummary<T> : Model<T>
/// </summary>
/// <value>The ID of the item to be added.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The payment processor to be used for the payment
Expand Down
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Basket/PractitionerSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public class PractitionerSummary : Model<PractitionerSummary>
/// </summary>
/// <value>The ID of the practitioner.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The full name of the practitioner.
/// </summary>
/// <value>The full name of the practitioner.</value>
[JsonPropertyName("name")]
public required string Name { get; set; }
public string Name { get; set; }
}
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Basket/RoomSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public class RoomSummary : Model<RoomSummary>
/// </summary>
/// <value>The ID of the room.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The name of the room.
/// </summary>
/// <value>The name of the room.</value>
[JsonPropertyName("name")]
public required string Name { get; set; }
public string Name { get; set; }
}
8 changes: 4 additions & 4 deletions libs/TrybeSDK/Api/Shop/Basket/ShopDiscount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ public class ShopDiscount : Model<ShopDiscount>
/// </summary>
/// <value>The ID of the discount.</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// A name associated with the discount.
/// </summary>
/// <value>A name associated with the discount.</value>
[JsonPropertyName("name")]
public required string Name { get; set; }
public string Name { get; set; }

/// <summary>
/// The type of the discount amount.
/// </summary>
/// <value>The type of the discount amount.</value>
[JsonPropertyName("amount_type")]
public required string AmountType { get; set; }
public string AmountType { get; set; }

/// <summary>
/// A calculated amount of the discount.
/// </summary>
/// <value>A calculated amount of the discount.</value>
[JsonPropertyName("calculated_amount")]
public required int CalculatedAmount { get; set; }
public int CalculatedAmount { get; set; }

/// <summary>
/// The ID of the coupon code that applied the discount, if applicable.
Expand Down
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Offerings/OfferingDateAvailability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ public class OfferingDateAvailability : Model<OfferingDateAvailability>
/// </summary>
/// <value>The date availability is for.</value>
[JsonPropertyName("date")]
public required DateTime Date { get; set; }
public DateTime Date { get; set; }

/// <summary>
/// Whether there is availability for the offering on this date.
/// </summary>
/// <value>Whether there is availability for the offering on this date.</value>
[JsonPropertyName("has_availability")]
public required bool HasAvailability { get; set; }
public bool HasAvailability { get; set; }

public string ToDebuggerString()
=> $"{Date:yyyy-MM-dd}: ({(HasAvailability ? "available" : "unavailable")})";
Expand Down
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Offerings/OfferingIdentifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public class OfferingIdentifier : Model<OfferingIdentifier>
/// </summary>
/// <value>The type of the offering.</value>
[JsonPropertyName("offering_type")]
public required string OfferingType { get; set; }
public string OfferingType { get; set; }

/// <summary>
/// The ID of the offering.
/// </summary>
/// <value>The ID of the offering.</value>
[JsonPropertyName("offering_id")]
public required string OfferingId { get; set; }
public string OfferingId { get; set; }

/// <summary>
/// The name of the offering.
Expand Down
4 changes: 2 additions & 2 deletions libs/TrybeSDK/Api/Shop/Offerings/ShopOffering.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ public class ShopOffering<T> : Model<T>
/// </summary>
/// <value>The ID of the offering</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The name of the offering
/// </summary>
/// <value>The name of the offering</value>
[JsonPropertyName("name")]
public required string Name { get; set; }
public string Name { get; set; }

/// <summary>
/// The name of the offering
Expand Down
2 changes: 1 addition & 1 deletion libs/TrybeSDK/Api/Shop/Offerings/ShopOfferingCategories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ShopOfferingCategories : Model<ShopOfferingCategories>
/// </summary>
/// <value>The ID of the category</value>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The name of the category
Expand Down
2 changes: 1 addition & 1 deletion libs/TrybeSDK/Api/Shop/Orders/BookingOrderItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class BookingOrderItem : Model<BookingOrderItem>
/// Gets or Sets Id
/// </summary>
[JsonPropertyName("id")]
public required string Id { get; set; }
public string Id { get; set; }

/// <summary>
/// The confirmation status of the item.
Expand Down
Loading

0 comments on commit fe46832

Please sign in to comment.