-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add Packages files originally filtered by gitignore
- Loading branch information
Showing
9 changed files
with
602 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// This work is licensed under the terms of the MIT license. | ||
// For a copy, see <https://opensource.org/licenses/MIT>. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace TrybeSDK.Api; | ||
|
||
public class AppointmentTypeMeta | ||
{ | ||
/// <summary> | ||
/// The meta title of this offering. If not specified, it falls back to the name of the offering. | ||
/// </summary> | ||
/// <value>The meta title of this offering. If not specified, it falls back to the name of the offering.</value> | ||
[JsonPropertyName("title")] | ||
public required string Title { get; set; } | ||
|
||
/// <summary> | ||
/// The meta description of this offering. If not specified, it falls back to the description of the offering. | ||
/// </summary> | ||
/// <value>The meta description of this offering. If not specified, it falls back to the description of the offering.</value> | ||
[JsonPropertyName("description")] | ||
public string? Description { get; set; } | ||
} |
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,65 @@ | ||
// This work is licensed under the terms of the MIT license. | ||
// For a copy, see <https://opensource.org/licenses/MIT>. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace TrybeSDK.Api; | ||
|
||
public class AvailabilityRule | ||
{ | ||
/// <summary> | ||
/// The ID of the availability rule. | ||
/// </summary> | ||
/// <value>The ID of the availability rule.</value> | ||
[JsonPropertyName("id")] | ||
public required string Id { get; set; } | ||
|
||
/// <summary> | ||
/// The start of the rule period. | ||
/// </summary> | ||
/// <value>The start of the rule period.</value> | ||
[JsonPropertyName("date_from")] | ||
public DateTime? DateFrom { get; set; } | ||
|
||
/// <summary> | ||
/// The end of the rule period. | ||
/// </summary> | ||
/// <value>The end of the rule period.</value> | ||
[JsonPropertyName("date_to")] | ||
public DateTime? DateTo { get; set; } | ||
|
||
/// <summary> | ||
/// The daily start time of the time period, in 24 hour format. | ||
/// </summary> | ||
/// <value>The daily start time of the time period, in 24 hour format.</value> | ||
[JsonPropertyName("time_from")] | ||
public string? TimeFrom { get; set; } | ||
|
||
/// <summary> | ||
/// The daily end time of the time period, in 24 hour format. | ||
/// </summary> | ||
/// <value>The daily end time of the time period, in 24 hour format.</value> | ||
[JsonPropertyName("time_to")] | ||
public string? TimeTo { get; set; } | ||
|
||
/// <summary> | ||
/// The weekday this rule applies to. | ||
/// </summary> | ||
/// <value>The weekday this rule applies to.</value> | ||
[JsonPropertyName("weekday")] | ||
public string? Weekday { get; set; } | ||
|
||
/// <summary> | ||
/// The weekdays this rule applies to. | ||
/// </summary> | ||
/// <value>The weekdays this rule applies to.</value> | ||
[JsonPropertyName("weekdays")] | ||
public List<string>? Weekdays { get; set; } | ||
|
||
/// <summary> | ||
/// Whether the resource is available during this period. Any `false` rules will override `true` rules. | ||
/// </summary> | ||
/// <value>Whether the resource is available during this period. Any `false` rules will override `true` rules.</value> | ||
[JsonPropertyName("is_available")] | ||
public bool? IsAvailable { get; set; } | ||
} |
30 changes: 30 additions & 0 deletions
30
libs/TrybeSDK/Api/Shop/Packages/MembershipBookingWindow.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,30 @@ | ||
// This work is licensed under the terms of the MIT license. | ||
// For a copy, see <https://opensource.org/licenses/MIT>. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace TrybeSDK.Api; | ||
|
||
public class MembershipBookingWindow | ||
{ | ||
/// <summary> | ||
/// The ID of the membership type this booking window applies to. | ||
/// </summary> | ||
/// <value>The ID of the membership type this booking window applies to.</value> | ||
[JsonPropertyName("membership_type_id")] | ||
public required string MembershipTypeId { get; set; } | ||
|
||
/// <summary> | ||
/// The maximum time before a booking's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations | ||
/// </summary> | ||
/// <value>The maximum time before a booking's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations</value> | ||
[JsonPropertyName("max_advance_bookings_interval")] | ||
public string? MaxAdvanceBookingsInterval { get; set; } | ||
|
||
/// <summary> | ||
/// The minimum time before a booking's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations | ||
/// </summary> | ||
/// <value>The minimum time before a booking's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations</value> | ||
[JsonPropertyName("min_advance_bookings_interval")] | ||
public string? MinAdvanceBookingsInterval { get; set; } | ||
} |
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,180 @@ | ||
// This work is licensed under the terms of the MIT license. | ||
// For a copy, see <https://opensource.org/licenses/MIT>. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace TrybeSDK.Api; | ||
|
||
public class Package : ShopOffering | ||
{ | ||
/// <summary> | ||
/// A custom product code for the package. | ||
/// </summary> | ||
/// <value>A custom product code for the package.</value> | ||
[JsonPropertyName("product_code")] | ||
public string? ProductCode { get; set; } | ||
|
||
/// <summary> | ||
/// The ID of the site the package belongs to. | ||
/// </summary> | ||
/// <value>The ID of the site the package belongs to.</value> | ||
[JsonPropertyName("site_id")] | ||
public string? SiteId { get; set; } | ||
|
||
/// <summary> | ||
/// The rules defining periods during which this package is available | ||
/// </summary> | ||
/// <value>The rules defining periods during which this package is available</value> | ||
[JsonPropertyName("availability_rules")] | ||
public List<AvailabilityRule>? AvailabilityRules { get; set; } | ||
|
||
/// <summary> | ||
/// The maximum amount of time between the start of the first and end of the last item on each day of a package, in minutes. | ||
/// </summary> | ||
/// <value>The maximum amount of time between the start of the first and end of the last item on each day of a package, in minutes.</value> | ||
[JsonPropertyName("max_daily_duration")] | ||
public int? MaxDailyDuration { get; set; } | ||
|
||
/// <summary> | ||
/// Whether to prevent booking choices in this package from overlapping times. | ||
/// </summary> | ||
/// <value>Whether to prevent booking choices in this package from overlapping times.</value> | ||
[JsonPropertyName("prevent_choice_overlaps")] | ||
public bool? PreventChoiceOverlaps { get; set; } | ||
|
||
/// <summary> | ||
/// The maximum time before the package's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations | ||
/// </summary> | ||
/// <value>The maximum time before the package's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations</value> | ||
[JsonPropertyName("max_advance_bookings_interval")] | ||
public string? MaxAdvanceBookingsInterval { get; set; } | ||
|
||
/// <summary> | ||
/// The minimum time before the package's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations | ||
/// </summary> | ||
/// <value>The minimum time before the package's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations</value> | ||
[JsonPropertyName("min_advance_bookings_interval")] | ||
public string? MinAdvanceBookingsInterval { get; set; } | ||
|
||
/// <summary> | ||
/// The rules defining prices for this package | ||
/// </summary> | ||
/// <value>The rules defining prices for this package</value> | ||
[JsonPropertyName("price_rules")] | ||
public List<PackagePriceRule>? PriceRules { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets Meta | ||
/// </summary> | ||
[JsonPropertyName("meta")] | ||
public AppointmentTypeMeta? Meta { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets UpsellOfferings | ||
/// </summary> | ||
[JsonPropertyName("upsell_offerings")] | ||
public List<OfferingIdentifier>? UpsellOfferings { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets CrossSellOfferings | ||
/// </summary> | ||
[JsonPropertyName("cross_sell_offerings")] | ||
public List<OfferingIdentifier>? CrossSellOfferings { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets RelatedRetailOfferings | ||
/// </summary> | ||
[JsonPropertyName("related_retail_offerings")] | ||
public List<OfferingIdentifier>? RelatedRetailOfferings { get; set; } | ||
|
||
/// <summary> | ||
/// Whether this session type is bookable online | ||
/// </summary> | ||
/// <value>Whether this session type is bookable online</value> | ||
|
||
[JsonPropertyName("offered_online")] | ||
public bool? OfferedOnline { get; set; } | ||
|
||
/// <summary> | ||
/// Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines. | ||
/// </summary> | ||
/// <value>Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.</value> | ||
|
||
[JsonPropertyName("private")] | ||
public bool? Private { get; set; } | ||
|
||
/// <summary> | ||
/// Whether this package requires an active membership in order to book. | ||
/// </summary> | ||
/// <value>Whether this package requires an active membership in order to book.</value> | ||
[JsonPropertyName("members_only")] | ||
public bool? MembersOnly { get; set; } | ||
|
||
/// <summary> | ||
/// If this package is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types. | ||
/// </summary> | ||
/// <value>If this package is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types. </value> | ||
[JsonPropertyName("permitted_membership_type_ids")] | ||
public List<string>? PermittedMembershipTypeIds { get; set; } | ||
|
||
/// <summary> | ||
/// Whether membership-specific booking windows should be enabled for this package. | ||
/// </summary> | ||
/// <value>Whether membership-specific booking windows should be enabled for this package.</value> | ||
[JsonPropertyName("membership_booking_windows_enabled")] | ||
public bool? MembershipBookingWindowsEnabled { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets MembershipBookingWindows | ||
/// </summary> | ||
[JsonPropertyName("membership_booking_windows")] | ||
public List<MembershipBookingWindow>? MembershipBookingWindows { get; set; } | ||
|
||
/// <summary> | ||
/// Whether bookings of this type may be cancelled online by customers. A value of `unpaid` means this booking my be cancelled only if no payments have been recorded against the order it is part of. | ||
/// </summary> | ||
/// <value>Whether bookings of this type may be cancelled online by customers. A value of `unpaid` means this booking my be cancelled only if no payments have been recorded against the order it is part of.</value> | ||
[JsonPropertyName("customer_cancellation_permitted")] | ||
public string? CustomerCancellationPermitted { get; set; } | ||
|
||
/// <summary> | ||
/// The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations | ||
/// </summary> | ||
/// <value>The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations</value> | ||
[JsonPropertyName("customer_cancellation_min_duration")] | ||
public string? CustomerCancellationMinDuration { get; set; } | ||
|
||
/// <summary> | ||
/// The category IDs associated with this package type | ||
/// </summary> | ||
/// <value>The category IDs associated with this package type</value> | ||
[JsonPropertyName("category_ids")] | ||
public List<string>? CategoryIds { get; set; } | ||
|
||
/// <summary> | ||
/// The default revenue centre to fall back to to balance allocations | ||
/// </summary> | ||
/// <value>The default revenue centre to fall back to to balance allocations</value> | ||
[JsonPropertyName("default_revenue_centre")] | ||
public string? DefaultRevenueCentre { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets EmailOptions | ||
/// </summary> | ||
[JsonPropertyName("email_options")] | ||
public OfferingEmailOptions? EmailOptions { get; set; } | ||
|
||
/// <summary> | ||
/// The time and date that the appointment type was last updated. | ||
/// </summary> | ||
/// <value>The time and date that the appointment type was last updated.</value> | ||
[JsonPropertyName("updated_at")] | ||
public DateTime? UpdatedAt { get; set; } | ||
|
||
/// <summary> | ||
/// The time and date that the appointment type was archived. | ||
/// </summary> | ||
/// <value>The time and date that the appointment type was archived.</value> | ||
[JsonPropertyName("deleted_at")] | ||
public DateTime? DeletedAt { get; set; } | ||
} |
51 changes: 51 additions & 0 deletions
51
libs/TrybeSDK/Api/Shop/Packages/PackageChoiceStartTimeRule.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,51 @@ | ||
// This work is licensed under the terms of the MIT license. | ||
// For a copy, see <https://opensource.org/licenses/MIT>. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace TrybeSDK.Api; | ||
|
||
public class PackageChoiceStartTimeRule | ||
{ | ||
/// <summary> | ||
/// The type of the rule. | ||
/// </summary> | ||
/// <value>The type of the rule.</value> | ||
[JsonPropertyName("type")] | ||
public string? Type { get; set; } | ||
|
||
/// <summary> | ||
/// The base time that a relative start time should be calculated from. | ||
/// </summary> | ||
/// <value>The base time that a relative start time should be calculated from.</value> | ||
[JsonPropertyName("relative_to")] | ||
public string? RelativeTo { get; set; } | ||
|
||
/// <summary> | ||
/// The minimum number of minutes from the relative base point that should be allowed. | ||
/// </summary> | ||
/// <value>The minimum number of minutes from the relative base point that should be allowed.</value> | ||
[JsonPropertyName("relative_mins_from")] | ||
public int? RelativeMinsFrom { get; set; } | ||
|
||
/// <summary> | ||
/// The maximum number of minutes from the relative base point that should be allowed. | ||
/// </summary> | ||
/// <value>The maximum number of minutes from the relative base point that should be allowed.</value> | ||
[JsonPropertyName("relative_mins_to")] | ||
public int? RelativeMinsTo { get; set; } | ||
|
||
/// <summary> | ||
/// The earliest allowed start time. | ||
/// </summary> | ||
/// <value>The earliest allowed start time.</value> | ||
[JsonPropertyName("absolute_time_from")] | ||
public string? AbsoluteTimeFrom { get; set; } | ||
|
||
/// <summary> | ||
/// The latest allowed start time. | ||
/// </summary> | ||
/// <value>The latest allowed start time.</value> | ||
[JsonPropertyName("absolute_time_to")] | ||
public string? AbsoluteTimeTo { get; set; } | ||
} |
39 changes: 39 additions & 0 deletions
39
libs/TrybeSDK/Api/Shop/Packages/PackageItemChoiceOption.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,39 @@ | ||
// This work is licensed under the terms of the MIT license. | ||
// For a copy, see <https://opensource.org/licenses/MIT>. | ||
|
||
using System.Diagnostics; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace TrybeSDK.Api; | ||
|
||
[DebuggerDisplay("{Offering.ToDebuggerString(),nq}")] | ||
public class PackageItemChoiceOption | ||
{ | ||
/// <summary> | ||
/// The ID of the item type. | ||
/// </summary> | ||
/// <value>The ID of the item type.</value> | ||
[JsonPropertyName("id")] | ||
public required string Id { get; set; } | ||
|
||
/// <summary> | ||
/// The type of item this option represents. | ||
/// </summary> | ||
/// <value>The type of item this option represents.</value> | ||
[JsonPropertyName("item_type")] | ||
public string? ItemType { get; set; } | ||
|
||
/// <summary> | ||
/// A currency amount that this option would increase the package price by. | ||
/// </summary> | ||
/// <value>A currency amount that this option would increase the package price by.</value> | ||
[JsonPropertyName("price_change")] | ||
public int? PriceChange { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets Offering | ||
/// </summary> | ||
|
||
[JsonPropertyName("offering")] | ||
public ShopOffering? Offering { get; set; } | ||
} |
Oops, something went wrong.