Skip to content

Commit 60cd057

Browse files
amanda-tarafajskeet
authored andcommitted
feat: Generate Google.Apis.PaymentsResellerSubscription.v1 version 1.72.0.3937
1 parent 4c4a394 commit 60cd057

File tree

4 files changed

+249
-3
lines changed

4 files changed

+249
-3
lines changed

DiscoveryJson/paymentsresellersubscription.v1.json

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,29 @@
378378
"parent"
379379
],
380380
"parameters": {
381+
"cycleOptions.initialCycleDuration.count": {
382+
"description": "number of duration units to be included.",
383+
"format": "int32",
384+
"location": "query",
385+
"type": "integer"
386+
},
387+
"cycleOptions.initialCycleDuration.unit": {
388+
"description": "The unit used for the duration",
389+
"enum": [
390+
"UNIT_UNSPECIFIED",
391+
"MONTH",
392+
"DAY",
393+
"HOUR"
394+
],
395+
"enumDescriptions": [
396+
"Default value, reserved as an invalid or an unexpected value.",
397+
"Unit of a calendar month.",
398+
"Unit of a day.",
399+
"Unit of an hour. It is used for testing."
400+
],
401+
"location": "query",
402+
"type": "string"
403+
},
381404
"parent": {
382405
"description": "Required. The parent resource name, which is the identifier of the partner. It will have the format of \"partners/{partner_id}\".",
383406
"location": "path",
@@ -486,6 +509,46 @@
486509
"https://www.googleapis.com/auth/sdm.service"
487510
]
488511
}
512+
},
513+
"resources": {
514+
"lineItems": {
515+
"methods": {
516+
"patch": {
517+
"description": "Updates a line item of a subscription. It should be autenticated with a service account.",
518+
"flatPath": "v1/partners/{partnersId}/subscriptions/{subscriptionsId}/lineItems/{lineItemsId}",
519+
"httpMethod": "PATCH",
520+
"id": "paymentsresellersubscription.partners.subscriptions.lineItems.patch",
521+
"parameterOrder": [
522+
"name"
523+
],
524+
"parameters": {
525+
"name": {
526+
"description": "Identifier. Resource name of the line item. Format: partners/{partner}/subscriptions/{subscription}/lineItems/{lineItem}",
527+
"location": "path",
528+
"pattern": "^partners/[^/]+/subscriptions/[^/]+/lineItems/[^/]+$",
529+
"required": true,
530+
"type": "string"
531+
},
532+
"updateMask": {
533+
"description": "Required. The list of fields to update. Only a limited set of fields can be updated. The allowed fields are the following: - `product_payload.googleHomePayload.googleStructureId`",
534+
"format": "google-fieldmask",
535+
"location": "query",
536+
"type": "string"
537+
}
538+
},
539+
"path": "v1/{+name}",
540+
"request": {
541+
"$ref": "SubscriptionLineItem"
542+
},
543+
"response": {
544+
"$ref": "SubscriptionLineItem"
545+
},
546+
"scopes": [
547+
"https://www.googleapis.com/auth/sdm.service"
548+
]
549+
}
550+
}
551+
}
489552
}
490553
},
491554
"userSessions": {
@@ -523,7 +586,7 @@
523586
}
524587
}
525588
},
526-
"revision": "20251005",
589+
"revision": "20251012",
527590
"rootUrl": "https://paymentsresellersubscription.googleapis.com/",
528591
"schemas": {
529592
"Amount": {
@@ -615,6 +678,17 @@
615678
},
616679
"type": "object"
617680
},
681+
"CycleOptions": {
682+
"description": "The cycle options when starting and resuming a subscription.",
683+
"id": "CycleOptions",
684+
"properties": {
685+
"initialCycleDuration": {
686+
"$ref": "Duration",
687+
"description": "Optional. The duration of the initial cycle. Only `DAY` is supported. If set, Google will start the subscription with this initial cycle duration starting at the request time (see available methods below). A prorated charge will be applied. This option is available to the following methods: - partners.subscriptions.provision - partners.subscriptions.resume - partners.userSessions.generate "
688+
}
689+
},
690+
"type": "object"
691+
},
618692
"Duration": {
619693
"description": "Describes the length of a period of a time.",
620694
"id": "Duration",
@@ -1233,7 +1307,12 @@
12331307
"ResumeSubscriptionRequest": {
12341308
"description": "Request to resume a suspended subscription.",
12351309
"id": "ResumeSubscriptionRequest",
1236-
"properties": {},
1310+
"properties": {
1311+
"cycleOptions": {
1312+
"$ref": "CycleOptions",
1313+
"description": "Optional. The cycle options for the subscription."
1314+
}
1315+
},
12371316
"type": "object"
12381317
},
12391318
"ResumeSubscriptionResponse": {

EnumStorage/paymentsresellersubscription.v1.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
2+
"Google.Apis.PaymentsResellerSubscription.v1.PartnersResource+SubscriptionsResource+ProvisionRequest.CycleOptionsInitialCycleDurationUnitEnum": [
3+
"UNIT_UNSPECIFIED",
4+
"MONTH",
5+
"DAY",
6+
"HOUR"
7+
],
28
"Google.Apis.PaymentsResellerSubscription.v1.PaymentsResellerSubscriptionBaseServiceRequest<<TResponse>>.AltEnum": [
39
"json",
410
"media",

Src/Generated/Google.Apis.PaymentsResellerSubscription.v1/Google.Apis.PaymentsResellerSubscription.v1.cs

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,103 @@ public class SubscriptionsResource
599599
public SubscriptionsResource(Google.Apis.Services.IClientService service)
600600
{
601601
this.service = service;
602+
LineItems = new LineItemsResource(service);
603+
}
604+
605+
/// <summary>Gets the LineItems resource.</summary>
606+
public virtual LineItemsResource LineItems { get; }
607+
608+
/// <summary>The "lineItems" collection of methods.</summary>
609+
public class LineItemsResource
610+
{
611+
private const string Resource = "lineItems";
612+
613+
/// <summary>The service which this resource belongs to.</summary>
614+
private readonly Google.Apis.Services.IClientService service;
615+
616+
/// <summary>Constructs a new resource.</summary>
617+
public LineItemsResource(Google.Apis.Services.IClientService service)
618+
{
619+
this.service = service;
620+
}
621+
622+
/// <summary>
623+
/// Updates a line item of a subscription. It should be autenticated with a service account.
624+
/// </summary>
625+
/// <param name="body">The body of the request.</param>
626+
/// <param name="name">
627+
/// Identifier. Resource name of the line item. Format:
628+
/// partners/{partner}/subscriptions/{subscription}/lineItems/{lineItem}
629+
/// </param>
630+
public virtual PatchRequest Patch(Google.Apis.PaymentsResellerSubscription.v1.Data.SubscriptionLineItem body, string name)
631+
{
632+
return new PatchRequest(this.service, body, name);
633+
}
634+
635+
/// <summary>
636+
/// Updates a line item of a subscription. It should be autenticated with a service account.
637+
/// </summary>
638+
public class PatchRequest : PaymentsResellerSubscriptionBaseServiceRequest<Google.Apis.PaymentsResellerSubscription.v1.Data.SubscriptionLineItem>
639+
{
640+
/// <summary>Constructs a new Patch request.</summary>
641+
public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.PaymentsResellerSubscription.v1.Data.SubscriptionLineItem body, string name) : base(service)
642+
{
643+
Name = name;
644+
Body = body;
645+
InitParameters();
646+
}
647+
648+
/// <summary>
649+
/// Identifier. Resource name of the line item. Format:
650+
/// partners/{partner}/subscriptions/{subscription}/lineItems/{lineItem}
651+
/// </summary>
652+
[Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
653+
public virtual string Name { get; private set; }
654+
655+
/// <summary>
656+
/// Required. The list of fields to update. Only a limited set of fields can be updated. The allowed
657+
/// fields are the following: - `product_payload.googleHomePayload.googleStructureId`
658+
/// </summary>
659+
[Google.Apis.Util.RequestParameterAttribute("updateMask", Google.Apis.Util.RequestParameterType.Query)]
660+
public virtual object UpdateMask { get; set; }
661+
662+
/// <summary>Gets or sets the body of this request.</summary>
663+
Google.Apis.PaymentsResellerSubscription.v1.Data.SubscriptionLineItem Body { get; set; }
664+
665+
/// <summary>Returns the body of the request.</summary>
666+
protected override object GetBody() => Body;
667+
668+
/// <summary>Gets the method name.</summary>
669+
public override string MethodName => "patch";
670+
671+
/// <summary>Gets the HTTP method.</summary>
672+
public override string HttpMethod => "PATCH";
673+
674+
/// <summary>Gets the REST path.</summary>
675+
public override string RestPath => "v1/{+name}";
676+
677+
/// <summary>Initializes Patch parameter list.</summary>
678+
protected override void InitParameters()
679+
{
680+
base.InitParameters();
681+
RequestParameters.Add("name", new Google.Apis.Discovery.Parameter
682+
{
683+
Name = "name",
684+
IsRequired = true,
685+
ParameterType = "path",
686+
DefaultValue = null,
687+
Pattern = @"^partners/[^/]+/subscriptions/[^/]+/lineItems/[^/]+$",
688+
});
689+
RequestParameters.Add("updateMask", new Google.Apis.Discovery.Parameter
690+
{
691+
Name = "updateMask",
692+
IsRequired = false,
693+
ParameterType = "query",
694+
DefaultValue = null,
695+
Pattern = null,
696+
});
697+
}
698+
}
602699
}
603700

604701
/// <summary>
@@ -977,6 +1074,34 @@ public ProvisionRequest(Google.Apis.Services.IClientService service, Google.Apis
9771074
[Google.Apis.Util.RequestParameterAttribute("parent", Google.Apis.Util.RequestParameterType.Path)]
9781075
public virtual string Parent { get; private set; }
9791076

1077+
/// <summary>number of duration units to be included.</summary>
1078+
[Google.Apis.Util.RequestParameterAttribute("cycleOptions.initialCycleDuration.count", Google.Apis.Util.RequestParameterType.Query)]
1079+
public virtual System.Nullable<int> CycleOptionsInitialCycleDurationCount { get; set; }
1080+
1081+
/// <summary>The unit used for the duration</summary>
1082+
[Google.Apis.Util.RequestParameterAttribute("cycleOptions.initialCycleDuration.unit", Google.Apis.Util.RequestParameterType.Query)]
1083+
public virtual System.Nullable<CycleOptionsInitialCycleDurationUnitEnum> CycleOptionsInitialCycleDurationUnit { get; set; }
1084+
1085+
/// <summary>The unit used for the duration</summary>
1086+
public enum CycleOptionsInitialCycleDurationUnitEnum
1087+
{
1088+
/// <summary>Default value, reserved as an invalid or an unexpected value.</summary>
1089+
[Google.Apis.Util.StringValueAttribute("UNIT_UNSPECIFIED")]
1090+
UNITUNSPECIFIED = 0,
1091+
1092+
/// <summary>Unit of a calendar month.</summary>
1093+
[Google.Apis.Util.StringValueAttribute("MONTH")]
1094+
MONTH = 1,
1095+
1096+
/// <summary>Unit of a day.</summary>
1097+
[Google.Apis.Util.StringValueAttribute("DAY")]
1098+
DAY = 2,
1099+
1100+
/// <summary>Unit of an hour. It is used for testing.</summary>
1101+
[Google.Apis.Util.StringValueAttribute("HOUR")]
1102+
HOUR = 3,
1103+
}
1104+
9801105
/// <summary>
9811106
/// Required. Identifies the subscription resource on the Partner side. The value is restricted to 63
9821107
/// ASCII characters at the maximum. If a subscription was previously created with the same
@@ -1012,6 +1137,22 @@ protected override void InitParameters()
10121137
DefaultValue = null,
10131138
Pattern = @"^partners/[^/]+$",
10141139
});
1140+
RequestParameters.Add("cycleOptions.initialCycleDuration.count", new Google.Apis.Discovery.Parameter
1141+
{
1142+
Name = "cycleOptions.initialCycleDuration.count",
1143+
IsRequired = false,
1144+
ParameterType = "query",
1145+
DefaultValue = null,
1146+
Pattern = null,
1147+
});
1148+
RequestParameters.Add("cycleOptions.initialCycleDuration.unit", new Google.Apis.Discovery.Parameter
1149+
{
1150+
Name = "cycleOptions.initialCycleDuration.unit",
1151+
IsRequired = false,
1152+
ParameterType = "query",
1153+
DefaultValue = null,
1154+
Pattern = null,
1155+
});
10151156
RequestParameters.Add("subscriptionId", new Google.Apis.Discovery.Parameter
10161157
{
10171158
Name = "subscriptionId",
@@ -1381,6 +1522,22 @@ public class CreateSubscriptionIntent : Google.Apis.Requests.IDirectResponseSche
13811522
public virtual string ETag { get; set; }
13821523
}
13831524

1525+
/// <summary>The cycle options when starting and resuming a subscription.</summary>
1526+
public class CycleOptions : Google.Apis.Requests.IDirectResponseSchema
1527+
{
1528+
/// <summary>
1529+
/// Optional. The duration of the initial cycle. Only `DAY` is supported. If set, Google will start the
1530+
/// subscription with this initial cycle duration starting at the request time (see available methods below). A
1531+
/// prorated charge will be applied. This option is available to the following methods: -
1532+
/// partners.subscriptions.provision - partners.subscriptions.resume - partners.userSessions.generate
1533+
/// </summary>
1534+
[Newtonsoft.Json.JsonPropertyAttribute("initialCycleDuration")]
1535+
public virtual Duration InitialCycleDuration { get; set; }
1536+
1537+
/// <summary>The ETag of the item.</summary>
1538+
public virtual string ETag { get; set; }
1539+
}
1540+
13841541
/// <summary>Describes the length of a period of a time.</summary>
13851542
public class Duration : Google.Apis.Requests.IDirectResponseSchema
13861543
{
@@ -2124,6 +2281,10 @@ public class PromotionIntroductoryPricingDetailsIntroductoryPricingSpec : Google
21242281
/// <summary>Request to resume a suspended subscription.</summary>
21252282
public class ResumeSubscriptionRequest : Google.Apis.Requests.IDirectResponseSchema
21262283
{
2284+
/// <summary>Optional. The cycle options for the subscription.</summary>
2285+
[Newtonsoft.Json.JsonPropertyAttribute("cycleOptions")]
2286+
public virtual CycleOptions CycleOptions { get; set; }
2287+
21272288
/// <summary>The ETag of the item.</summary>
21282289
public virtual string ETag { get; set; }
21292290
}

Src/Generated/Google.Apis.PaymentsResellerSubscription.v1/Google.Apis.PaymentsResellerSubscription.v1.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- nupkg information -->
44
<PropertyGroup>
55
<Title>Google.Apis.PaymentsResellerSubscription.v1 Client Library</Title>
6-
<Version>1.72.0.3930</Version>
6+
<Version>1.72.0.3937</Version>
77
<Authors>Google LLC</Authors>
88
<Copyright>Copyright 2025 Google LLC</Copyright>
99
<PackageTags>Google</PackageTags>

0 commit comments

Comments
 (0)