@@ -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 }
0 commit comments