Skip to content

Commit c711634

Browse files
Merge pull request #30 from sherweb/sherweb/rcayouette/beta/update-service-provider-api
Update Sherweb.Apis.ServiceProvider with new beta changes
2 parents 686cbc6 + 6727a11 commit c711634

File tree

8 files changed

+196
-6
lines changed

8 files changed

+196
-6
lines changed

NugetPackagesSourceCode/Sherweb.Apis.ServiceProvider/HttpClient/IServiceProviderService.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ public partial interface IServiceProviderService : System.IDisposable
6565
/// Get the amounts that one of your customers owe you for a specific
6666
/// billing period. There are three types of charges that are included
6767
/// in the data returned: recurring, usage, and setup.
68+
/// <div
69+
/// style="color:#FF9B00;background-color:#FCF8E3;padding:1rem;border-radius:5px;border:1px
70+
/// solid #FF9B00;display:inline-block"><svg width="16"
71+
/// height="16" fill="currentColor" viewBox="0 0 16 16"><path
72+
/// d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091
73+
/// 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8
74+
/// 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1
75+
/// 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"
76+
/// /></svg> For the time being, you cannot use the Service
77+
/// Provider API rebilling feature
78+
/// (<i>GetReceivableCharges</i> endpoint) while having a
79+
/// PSA integration enabled.</div>
6880
/// </remarks>
6981
/// <param name='customerId'>
7082
/// </param>
@@ -110,7 +122,7 @@ public partial interface IServiceProviderService : System.IDisposable
110122
/// CreateSubscriptionsAmendment (beta)
111123
/// </summary>
112124
/// <remarks>
113-
/// Amend subscriptions quantities for one of your customers.
125+
/// Amend subscription quantities for one of your customers.
114126
/// </remarks>
115127
/// <param name='customerId'>
116128
/// </param>

NugetPackagesSourceCode/Sherweb.Apis.ServiceProvider/HttpClient/Models/Subscription.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ public Subscription()
2222
/// <summary>
2323
/// Initializes a new instance of the Subscription class.
2424
/// </summary>
25-
public Subscription(System.Guid? id = default(System.Guid?), string productName = default(string), string sku = default(string), int? quantity = default(int?))
25+
public Subscription(System.Guid? id = default(System.Guid?), string productName = default(string), string description = default(string), string sku = default(string), int? quantity = default(int?), SubscriptionCommitmentTerm commitmentTerm = default(SubscriptionCommitmentTerm))
2626
{
2727
Id = id;
2828
ProductName = productName;
29+
Description = description;
2930
Sku = sku;
3031
Quantity = quantity;
32+
CommitmentTerm = commitmentTerm;
3133
CustomInit();
3234
}
3335

@@ -46,6 +48,11 @@ public Subscription()
4648
[JsonProperty(PropertyName = "productName")]
4749
public string ProductName { get; set; }
4850

51+
/// <summary>
52+
/// </summary>
53+
[JsonProperty(PropertyName = "description")]
54+
public string Description { get; set; }
55+
4956
/// <summary>
5057
/// </summary>
5158
[JsonProperty(PropertyName = "sku")]
@@ -56,5 +63,10 @@ public Subscription()
5663
[JsonProperty(PropertyName = "quantity")]
5764
public int? Quantity { get; set; }
5865

66+
/// <summary>
67+
/// </summary>
68+
[JsonProperty(PropertyName = "commitmentTerm")]
69+
public SubscriptionCommitmentTerm CommitmentTerm { get; set; }
70+
5971
}
6072
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// <auto-generated>
2+
// Code generated by Microsoft (R) AutoRest Code Generator.
3+
// Changes may cause incorrect behavior and will be lost if the code is
4+
// regenerated.
5+
// </auto-generated>
6+
7+
namespace Sherweb.Apis.ServiceProvider.Models
8+
{
9+
using Microsoft.Rest;
10+
using Microsoft.Rest.Serialization;
11+
using Newtonsoft.Json;
12+
using System.Linq;
13+
14+
/// <summary>
15+
/// Null for subscriptions that are not tied to a commitment
16+
/// </summary>
17+
public partial class SubscriptionCommitmentTerm
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the SubscriptionCommitmentTerm class.
21+
/// </summary>
22+
public SubscriptionCommitmentTerm()
23+
{
24+
CustomInit();
25+
}
26+
27+
/// <summary>
28+
/// Initializes a new instance of the SubscriptionCommitmentTerm class.
29+
/// </summary>
30+
/// <param name="type">Possible values include: 'Monthly', 'Annual',
31+
/// 'Biennial', 'Triennial'</param>
32+
/// <param name="termEndDate">The last day of the commitment
33+
/// term</param>
34+
public SubscriptionCommitmentTerm(string type = default(string), System.DateTime? termEndDate = default(System.DateTime?), SubscriptionRenewalConfiguration renewalConfiguration = default(SubscriptionRenewalConfiguration))
35+
{
36+
Type = type;
37+
TermEndDate = termEndDate;
38+
RenewalConfiguration = renewalConfiguration;
39+
CustomInit();
40+
}
41+
42+
/// <summary>
43+
/// An initialization method that performs custom operations like setting defaults
44+
/// </summary>
45+
partial void CustomInit();
46+
47+
/// <summary>
48+
/// Gets or sets possible values include: 'Monthly', 'Annual',
49+
/// 'Biennial', 'Triennial'
50+
/// </summary>
51+
[JsonProperty(PropertyName = "type")]
52+
public string Type { get; set; }
53+
54+
/// <summary>
55+
/// Gets or sets the last day of the commitment term
56+
/// </summary>
57+
[JsonConverter(typeof(DateJsonConverter))]
58+
[JsonProperty(PropertyName = "termEndDate")]
59+
public System.DateTime? TermEndDate { get; set; }
60+
61+
/// <summary>
62+
/// </summary>
63+
[JsonProperty(PropertyName = "renewalConfiguration")]
64+
public SubscriptionRenewalConfiguration RenewalConfiguration { get; set; }
65+
66+
}
67+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// <auto-generated>
2+
// Code generated by Microsoft (R) AutoRest Code Generator.
3+
// Changes may cause incorrect behavior and will be lost if the code is
4+
// regenerated.
5+
// </auto-generated>
6+
7+
namespace Sherweb.Apis.ServiceProvider.Models
8+
{
9+
using Microsoft.Rest;
10+
using Microsoft.Rest.Serialization;
11+
using Newtonsoft.Json;
12+
using System.Linq;
13+
14+
/// <summary>
15+
/// Null for subscriptions that will not auto-renew at the end of the
16+
/// commitment term
17+
/// </summary>
18+
public partial class SubscriptionRenewalConfiguration
19+
{
20+
/// <summary>
21+
/// Initializes a new instance of the SubscriptionRenewalConfiguration
22+
/// class.
23+
/// </summary>
24+
public SubscriptionRenewalConfiguration()
25+
{
26+
CustomInit();
27+
}
28+
29+
/// <summary>
30+
/// Initializes a new instance of the SubscriptionRenewalConfiguration
31+
/// class.
32+
/// </summary>
33+
/// <param name="renewalDate">The first day of the next commitment
34+
/// term</param>
35+
/// <param name="scheduledQuantity">In the absence of a
36+
/// ScheduledQuantity, the subscription will renew with the existing
37+
/// quantity</param>
38+
public SubscriptionRenewalConfiguration(System.DateTime? renewalDate = default(System.DateTime?), int? scheduledQuantity = default(int?))
39+
{
40+
RenewalDate = renewalDate;
41+
ScheduledQuantity = scheduledQuantity;
42+
CustomInit();
43+
}
44+
45+
/// <summary>
46+
/// An initialization method that performs custom operations like setting defaults
47+
/// </summary>
48+
partial void CustomInit();
49+
50+
/// <summary>
51+
/// Gets or sets the first day of the next commitment term
52+
/// </summary>
53+
[JsonConverter(typeof(DateJsonConverter))]
54+
[JsonProperty(PropertyName = "renewalDate")]
55+
public System.DateTime? RenewalDate { get; set; }
56+
57+
/// <summary>
58+
/// Gets or sets in the absence of a ScheduledQuantity, the
59+
/// subscription will renew with the existing quantity
60+
/// </summary>
61+
[JsonProperty(PropertyName = "scheduledQuantity")]
62+
public int? ScheduledQuantity { get; set; }
63+
64+
}
65+
}

NugetPackagesSourceCode/Sherweb.Apis.ServiceProvider/HttpClient/ServiceProviderService.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,17 @@ private void Initialize()
457457
/// Get the amounts that one of your customers owe you for a specific billing
458458
/// period. There are three types of charges that are included in the data
459459
/// returned: recurring, usage, and setup.
460+
/// &lt;div
461+
/// style="color:#FF9B00;background-color:#FCF8E3;padding:1rem;border-radius:5px;border:1px
462+
/// solid #FF9B00;display:inline-block"&gt;&lt;svg width="16" height="16"
463+
/// fill="currentColor" viewBox="0 0 16 16"&gt;&lt;path d="M8.982 1.566a1.13
464+
/// 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0
465+
/// 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35
466+
/// 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0
467+
/// 2 1 1 0 0 1 0-2z" /&gt;&lt;/svg&gt; For the time being, you cannot use the
468+
/// Service Provider API rebilling feature
469+
/// (&lt;i&gt;GetReceivableCharges&lt;/i&gt; endpoint) while having a PSA
470+
/// integration enabled.&lt;/div&gt;
460471
/// </remarks>
461472
/// <param name='customerId'>
462473
/// </param>
@@ -769,7 +780,7 @@ private void Initialize()
769780
/// CreateSubscriptionsAmendment (beta)
770781
/// </summary>
771782
/// <remarks>
772-
/// Amend subscriptions quantities for one of your customers.
783+
/// Amend subscription quantities for one of your customers.
773784
/// </remarks>
774785
/// <param name='customerId'>
775786
/// </param>

NugetPackagesSourceCode/Sherweb.Apis.ServiceProvider/HttpClient/ServiceProviderServiceExtensions.cs

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ public static partial class ServiceProviderServiceExtensions
6464
/// Get the amounts that one of your customers owe you for a specific billing
6565
/// period. There are three types of charges that are included in the data
6666
/// returned: recurring, usage, and setup.
67+
/// &lt;div
68+
/// style="color:#FF9B00;background-color:#FCF8E3;padding:1rem;border-radius:5px;border:1px
69+
/// solid #FF9B00;display:inline-block"&gt;&lt;svg width="16" height="16"
70+
/// fill="currentColor" viewBox="0 0 16 16"&gt;&lt;path d="M8.982 1.566a1.13
71+
/// 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0
72+
/// 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35
73+
/// 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0
74+
/// 2 1 1 0 0 1 0-2z" /&gt;&lt;/svg&gt; For the time being, you cannot use the
75+
/// Service Provider API rebilling feature
76+
/// (&lt;i&gt;GetReceivableCharges&lt;/i&gt; endpoint) while having a PSA
77+
/// integration enabled.&lt;/div&gt;
6778
/// </remarks>
6879
/// <param name='operations'>
6980
/// The operations group for this extension method.
@@ -92,6 +103,17 @@ public static partial class ServiceProviderServiceExtensions
92103
/// Get the amounts that one of your customers owe you for a specific billing
93104
/// period. There are three types of charges that are included in the data
94105
/// returned: recurring, usage, and setup.
106+
/// &lt;div
107+
/// style="color:#FF9B00;background-color:#FCF8E3;padding:1rem;border-radius:5px;border:1px
108+
/// solid #FF9B00;display:inline-block"&gt;&lt;svg width="16" height="16"
109+
/// fill="currentColor" viewBox="0 0 16 16"&gt;&lt;path d="M8.982 1.566a1.13
110+
/// 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0
111+
/// 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35
112+
/// 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0
113+
/// 2 1 1 0 0 1 0-2z" /&gt;&lt;/svg&gt; For the time being, you cannot use the
114+
/// Service Provider API rebilling feature
115+
/// (&lt;i&gt;GetReceivableCharges&lt;/i&gt; endpoint) while having a PSA
116+
/// integration enabled.&lt;/div&gt;
95117
/// </remarks>
96118
/// <param name='operations'>
97119
/// The operations group for this extension method.
@@ -169,7 +191,7 @@ public static partial class ServiceProviderServiceExtensions
169191
/// CreateSubscriptionsAmendment (beta)
170192
/// </summary>
171193
/// <remarks>
172-
/// Amend subscriptions quantities for one of your customers.
194+
/// Amend subscription quantities for one of your customers.
173195
/// </remarks>
174196
/// <param name='operations'>
175197
/// The operations group for this extension method.
@@ -191,7 +213,7 @@ public static partial class ServiceProviderServiceExtensions
191213
/// CreateSubscriptionsAmendment (beta)
192214
/// </summary>
193215
/// <remarks>
194-
/// Amend subscriptions quantities for one of your customers.
216+
/// Amend subscription quantities for one of your customers.
195217
/// </remarks>
196218
/// <param name='operations'>
197219
/// The operations group for this extension method.

NugetPackagesSourceCode/Sherweb.Apis.ServiceProvider/Sherweb.Apis.ServiceProvider.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<PackageId>Sherweb.Apis.ServiceProvider</PackageId>
77
<PackageTags>Sherweb API Client ServiceProvider</PackageTags>
88
<Description>Sherweb ServiceProvider API Client</Description>
9-
<Version>1.0.0-beta04</Version>
9+
<Version>1.0.0-beta05</Version>
1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1111
</PropertyGroup>
1212
<ItemGroup>

0 commit comments

Comments
 (0)