google-apis-paymentsresellersubscription_v1 0.10.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38da6cac623b643ab6e47473ea03a6a64d6a75c998bcb70c7866682b75587a75
4
- data.tar.gz: 38be92362eea6f73ecb057fdd6887d1220f585449c52cb1b12935b679f66ded2
3
+ metadata.gz: 4e5ac74e28045d6d661be544e7234fa175f048d775b8121d230b01cdca813ffb
4
+ data.tar.gz: b3b1572c3d5a9f07fbe160a6dfc80c23d9d47608e71572be3aa402dbdb49c1ac
5
5
  SHA512:
6
- metadata.gz: 79169f759e50bf222ae390a0cffad59d8e7b3a60326df1395ab68a25e374560dfe0ee286e8c14d627559402c4eee7bd8bf23341b37881e43caccaf468b2c59d8
7
- data.tar.gz: dd9f412de74f36ce846faf3bebb487d425a4dc406c591446313249d268a311155ea3a176f6ddc9af9f198d777a5b177d01556eeba24f112b2cb913668693be51
6
+ metadata.gz: e40290af65c2e92204bf43f09133b166c58f8ffc83e59a5326d5973292f89e6f95c2f2ea54769d73f32226ab089a44ce19256be0649bb203b99d8683270c166d
7
+ data.tar.gz: c4447c342a9f12ddca33cb76ca998822173320c90f5d4ab4c52e7d11ea597205bbeca9c4eff94ad28e434e2452f0e265eac3fa71e0328c50dc2b8dafca14f176
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Release history for google-apis-paymentsresellersubscription_v1
2
2
 
3
+ ### v0.13.0 (2022-06-07)
4
+
5
+ * Regenerated from discovery document revision 20220605
6
+ * Regenerated using generator version 0.5.0
7
+
8
+ ### v0.12.0 (2022-05-05)
9
+
10
+ * Regenerated from discovery document revision 20220504
11
+
12
+ ### v0.11.0 (2022-03-12)
13
+
14
+ * Regenerated from discovery document revision 20220311
15
+ * Regenerated using generator version 0.4.1
16
+
3
17
  ### v0.10.0 (2021-12-14)
4
18
 
5
19
  * Unspecified changes
@@ -54,7 +54,7 @@ module Google
54
54
  class GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionResponse
55
55
  include Google::Apis::Core::Hashable
56
56
 
57
- # A Subscription resource managed by 3P Partners.
57
+ # LINT.IfChange A Subscription resource managed by 3P Partners.
58
58
  # Corresponds to the JSON property `subscription`
59
59
  # @return [Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription]
60
60
  attr_accessor :subscription
@@ -112,7 +112,7 @@ module Google
112
112
  class GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse
113
113
  include Google::Apis::Core::Hashable
114
114
 
115
- # A Subscription resource managed by 3P Partners.
115
+ # LINT.IfChange A Subscription resource managed by 3P Partners.
116
116
  # Corresponds to the JSON property `subscription`
117
117
  # @return [Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription]
118
118
  attr_accessor :subscription
@@ -221,6 +221,74 @@ module Google
221
221
  end
222
222
  end
223
223
 
224
+ #
225
+ class GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsRequest
226
+ include Google::Apis::Core::Hashable
227
+
228
+ # Optional. Specifies the filters for the promotion results. The syntax defined
229
+ # in the EBNF grammar: https://google.aip.dev/assets/misc/ebnf-filtering.txt. An
230
+ # error will be thrown if any specified parameter is not supported. Currently,
231
+ # it can only be used by Youtube partners. Allowed parameters are: - regionCodes
232
+ # - zipCode - eligibilityId - applicableProducts Multiple parameters can be
233
+ # specified, for example: "regionCodes=US zipCode=94043 eligibilityId=
234
+ # 2022H1Campaign", or "applicableProducts=partners/p1/products/product2"
235
+ # Corresponds to the JSON property `filter`
236
+ # @return [String]
237
+ attr_accessor :filter
238
+
239
+ # Optional. The maximum number of promotions to return. The service may return
240
+ # fewer than this value. If unspecified, at most 50 products will be returned.
241
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
242
+ # Corresponds to the JSON property `pageSize`
243
+ # @return [Fixnum]
244
+ attr_accessor :page_size
245
+
246
+ # Optional. A page token, received from a previous `ListPromotions` call.
247
+ # Provide this to retrieve the subsequent page. When paginating, all other
248
+ # parameters provided to `ListPromotions` must match the call that provided the
249
+ # page token.
250
+ # Corresponds to the JSON property `pageToken`
251
+ # @return [String]
252
+ attr_accessor :page_token
253
+
254
+ def initialize(**args)
255
+ update!(**args)
256
+ end
257
+
258
+ # Update properties of this object
259
+ def update!(**args)
260
+ @filter = args[:filter] if args.key?(:filter)
261
+ @page_size = args[:page_size] if args.key?(:page_size)
262
+ @page_token = args[:page_token] if args.key?(:page_token)
263
+ end
264
+ end
265
+
266
+ # Response containing the found promotions for the current user.
267
+ class GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse
268
+ include Google::Apis::Core::Hashable
269
+
270
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
271
+ # field is empty, there are no subsequent pages.
272
+ # Corresponds to the JSON property `nextPageToken`
273
+ # @return [String]
274
+ attr_accessor :next_page_token
275
+
276
+ # The promotions for the current user.
277
+ # Corresponds to the JSON property `promotions`
278
+ # @return [Array<Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Promotion>]
279
+ attr_accessor :promotions
280
+
281
+ def initialize(**args)
282
+ update!(**args)
283
+ end
284
+
285
+ # Update properties of this object
286
+ def update!(**args)
287
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
288
+ @promotions = args[:promotions] if args.key?(:promotions)
289
+ end
290
+ end
291
+
224
292
  #
225
293
  class GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse
226
294
  include Google::Apis::Core::Hashable
@@ -449,7 +517,7 @@ module Google
449
517
  end
450
518
  end
451
519
 
452
- # A Subscription resource managed by 3P Partners.
520
+ # LINT.IfChange A Subscription resource managed by 3P Partners.
453
521
  class GoogleCloudPaymentsResellerSubscriptionV1Subscription
454
522
  include Google::Apis::Core::Hashable
455
523
 
@@ -483,6 +551,11 @@ module Google
483
551
  # @return [String]
484
552
  attr_accessor :free_trial_end_time
485
553
 
554
+ # Required. The line items of the subscription.
555
+ # Corresponds to the JSON property `lineItems`
556
+ # @return [Array<Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem>]
557
+ attr_accessor :line_items
558
+
486
559
  # Output only. Response only. Resource name of the subscription. It will have
487
560
  # the format of "partners/`partner_id`/subscriptions/`subscription_id`"
488
561
  # Corresponds to the JSON property `name`
@@ -502,15 +575,25 @@ module Google
502
575
  # @return [String]
503
576
  attr_accessor :processing_state
504
577
 
505
- # Required. Resource name that identifies one or more subscription products. The
506
- # format will be 'partners/`partner_id`/products/`product_id`'.
578
+ # Required. Deprecated: consider using `line_items` as the input. Required.
579
+ # Resource name that identifies the purchased products. The format will be '
580
+ # partners/`partner_id`/products/`product_id`'.
507
581
  # Corresponds to the JSON property `products`
508
582
  # @return [Array<String>]
509
583
  attr_accessor :products
510
584
 
511
- # Optional. Resource name that identifies one or more promotions that can be
512
- # applied on the product. A typical promotion for a subscription is Free trial.
513
- # The format will be 'partners/`partner_id`/promotions/`promotion_id`'.
585
+ # Optional. Subscription-level promotions. Only free trial is supported on this
586
+ # level. It determines the first renewal time of the subscription to be the end
587
+ # of the free trial period. Specify the promotion resource name only when used
588
+ # as input.
589
+ # Corresponds to the JSON property `promotionSpecs`
590
+ # @return [Array<Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec>]
591
+ attr_accessor :promotion_specs
592
+
593
+ # Optional. Deprecated: consider using the top-level `promotion_specs` as the
594
+ # input. Optional. Resource name that identifies one or more promotions that can
595
+ # be applied on the product. A typical promotion for a subscription is Free
596
+ # trial. The format will be 'partners/`partner_id`/promotions/`promotion_id`'.
514
597
  # Corresponds to the JSON property `promotions`
515
598
  # @return [Array<String>]
516
599
  attr_accessor :promotions
@@ -567,10 +650,12 @@ module Google
567
650
  @cycle_end_time = args[:cycle_end_time] if args.key?(:cycle_end_time)
568
651
  @end_user_entitled = args[:end_user_entitled] if args.key?(:end_user_entitled)
569
652
  @free_trial_end_time = args[:free_trial_end_time] if args.key?(:free_trial_end_time)
653
+ @line_items = args[:line_items] if args.key?(:line_items)
570
654
  @name = args[:name] if args.key?(:name)
571
655
  @partner_user_token = args[:partner_user_token] if args.key?(:partner_user_token)
572
656
  @processing_state = args[:processing_state] if args.key?(:processing_state)
573
657
  @products = args[:products] if args.key?(:products)
658
+ @promotion_specs = args[:promotion_specs] if args.key?(:promotion_specs)
574
659
  @promotions = args[:promotions] if args.key?(:promotions)
575
660
  @redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
576
661
  @renewal_time = args[:renewal_time] if args.key?(:renewal_time)
@@ -600,6 +685,94 @@ module Google
600
685
  end
601
686
  end
602
687
 
688
+ # Individual line item definition of a subscription. Next id: 6
689
+ class GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem
690
+ include Google::Apis::Core::Hashable
691
+
692
+ # Output only. Description of this line item.
693
+ # Corresponds to the JSON property `description`
694
+ # @return [String]
695
+ attr_accessor :description
696
+
697
+ # Output only. It is set only if the line item has its own free trial applied.
698
+ # End time of the line item free trial period, in ISO 8061 format. For example, "
699
+ # 2019-08-31T17:28:54.564Z". It will be set the same as createTime if no free
700
+ # trial promotion is specified.
701
+ # Corresponds to the JSON property `lineItemFreeTrialEndTime`
702
+ # @return [String]
703
+ attr_accessor :line_item_free_trial_end_time
704
+
705
+ # Optional. The promotions applied on the line item. It can be: - a free trial
706
+ # promotion, which overrides the subscription-level free trial promotion. - an
707
+ # introductory pricing promotion. When used as input in Create or Provision API,
708
+ # specify its resource name only.
709
+ # Corresponds to the JSON property `lineItemPromotionSpecs`
710
+ # @return [Array<Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec>]
711
+ attr_accessor :line_item_promotion_specs
712
+
713
+ # Required. Product resource name that identifies one the line item The format
714
+ # is 'partners/`partner_id`/products/`product_id`'.
715
+ # Corresponds to the JSON property `product`
716
+ # @return [String]
717
+ attr_accessor :product
718
+
719
+ # Output only. The state of the line item.
720
+ # Corresponds to the JSON property `state`
721
+ # @return [String]
722
+ attr_accessor :state
723
+
724
+ def initialize(**args)
725
+ update!(**args)
726
+ end
727
+
728
+ # Update properties of this object
729
+ def update!(**args)
730
+ @description = args[:description] if args.key?(:description)
731
+ @line_item_free_trial_end_time = args[:line_item_free_trial_end_time] if args.key?(:line_item_free_trial_end_time)
732
+ @line_item_promotion_specs = args[:line_item_promotion_specs] if args.key?(:line_item_promotion_specs)
733
+ @product = args[:product] if args.key?(:product)
734
+ @state = args[:state] if args.key?(:state)
735
+ end
736
+ end
737
+
738
+ # Describes the spec for one promotion.
739
+ class GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec
740
+ include Google::Apis::Core::Hashable
741
+
742
+ # Describes the length of a period of a time.
743
+ # Corresponds to the JSON property `freeTrialDuration`
744
+ # @return [Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Duration]
745
+ attr_accessor :free_trial_duration
746
+
747
+ # The details of a introductory pricing promotion.
748
+ # Corresponds to the JSON property `introductoryPricingDetails`
749
+ # @return [Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetails]
750
+ attr_accessor :introductory_pricing_details
751
+
752
+ # Required. Promotion resource name that identifies a promotion. The format is '
753
+ # partners/`partner_id`/promotions/`promotion_id`'.
754
+ # Corresponds to the JSON property `promotion`
755
+ # @return [String]
756
+ attr_accessor :promotion
757
+
758
+ # Output only. The type of the promotion for the spec.
759
+ # Corresponds to the JSON property `type`
760
+ # @return [String]
761
+ attr_accessor :type
762
+
763
+ def initialize(**args)
764
+ update!(**args)
765
+ end
766
+
767
+ # Update properties of this object
768
+ def update!(**args)
769
+ @free_trial_duration = args[:free_trial_duration] if args.key?(:free_trial_duration)
770
+ @introductory_pricing_details = args[:introductory_pricing_details] if args.key?(:introductory_pricing_details)
771
+ @promotion = args[:promotion] if args.key?(:promotion)
772
+ @type = args[:type] if args.key?(:type)
773
+ end
774
+ end
775
+
603
776
  # Details about the previous subscription that this new subscription upgrades/
604
777
  # downgrades from.
605
778
  class GoogleCloudPaymentsResellerSubscriptionV1SubscriptionUpgradeDowngradeDetails
@@ -645,7 +818,7 @@ module Google
645
818
  class GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionResponse
646
819
  include Google::Apis::Core::Hashable
647
820
 
648
- # A Subscription resource managed by 3P Partners.
821
+ # LINT.IfChange A Subscription resource managed by 3P Partners.
649
822
  # Corresponds to the JSON property `subscription`
650
823
  # @return [Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription]
651
824
  attr_accessor :subscription
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module PaymentsresellersubscriptionV1
18
18
  # Version of the google-apis-paymentsresellersubscription_v1 gem
19
- GEM_VERSION = "0.10.0"
19
+ GEM_VERSION = "0.13.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.4.0"
22
+ GENERATOR_VERSION = "0.5.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20211112"
25
+ REVISION = "20220605"
26
26
  end
27
27
  end
28
28
  end
@@ -70,6 +70,18 @@ module Google
70
70
  include Google::Apis::Core::JsonObjectSupport
71
71
  end
72
72
 
73
+ class GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsRequest
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
73
85
  class GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse
74
86
  class Representation < Google::Apis::Core::JsonRepresentation; end
75
87
 
@@ -124,6 +136,18 @@ module Google
124
136
  include Google::Apis::Core::JsonObjectSupport
125
137
  end
126
138
 
139
+ class GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
127
151
  class GoogleCloudPaymentsResellerSubscriptionV1SubscriptionUpgradeDowngradeDetails
128
152
  class Representation < Google::Apis::Core::JsonRepresentation; end
129
153
 
@@ -213,6 +237,24 @@ module Google
213
237
  end
214
238
  end
215
239
 
240
+ class GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsRequest
241
+ # @private
242
+ class Representation < Google::Apis::Core::JsonRepresentation
243
+ property :filter, as: 'filter'
244
+ property :page_size, as: 'pageSize'
245
+ property :page_token, as: 'pageToken'
246
+ end
247
+ end
248
+
249
+ class GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse
250
+ # @private
251
+ class Representation < Google::Apis::Core::JsonRepresentation
252
+ property :next_page_token, as: 'nextPageToken'
253
+ collection :promotions, as: 'promotions', class: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Promotion, decorator: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Promotion::Representation
254
+
255
+ end
256
+ end
257
+
216
258
  class GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse
217
259
  # @private
218
260
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -293,10 +335,14 @@ module Google
293
335
  property :cycle_end_time, as: 'cycleEndTime'
294
336
  property :end_user_entitled, as: 'endUserEntitled'
295
337
  property :free_trial_end_time, as: 'freeTrialEndTime'
338
+ collection :line_items, as: 'lineItems', class: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem, decorator: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem::Representation
339
+
296
340
  property :name, as: 'name'
297
341
  property :partner_user_token, as: 'partnerUserToken'
298
342
  property :processing_state, as: 'processingState'
299
343
  collection :products, as: 'products'
344
+ collection :promotion_specs, as: 'promotionSpecs', class: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec, decorator: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec::Representation
345
+
300
346
  collection :promotions, as: 'promotions'
301
347
  property :redirect_uri, as: 'redirectUri'
302
348
  property :renewal_time, as: 'renewalTime'
@@ -316,6 +362,30 @@ module Google
316
362
  end
317
363
  end
318
364
 
365
+ class GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem
366
+ # @private
367
+ class Representation < Google::Apis::Core::JsonRepresentation
368
+ property :description, as: 'description'
369
+ property :line_item_free_trial_end_time, as: 'lineItemFreeTrialEndTime'
370
+ collection :line_item_promotion_specs, as: 'lineItemPromotionSpecs', class: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec, decorator: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec::Representation
371
+
372
+ property :product, as: 'product'
373
+ property :state, as: 'state'
374
+ end
375
+ end
376
+
377
+ class GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec
378
+ # @private
379
+ class Representation < Google::Apis::Core::JsonRepresentation
380
+ property :free_trial_duration, as: 'freeTrialDuration', class: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Duration, decorator: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Duration::Representation
381
+
382
+ property :introductory_pricing_details, as: 'introductoryPricingDetails', class: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetails, decorator: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetails::Representation
383
+
384
+ property :promotion, as: 'promotion'
385
+ property :type, as: 'type'
386
+ end
387
+ end
388
+
319
389
  class GoogleCloudPaymentsResellerSubscriptionV1SubscriptionUpgradeDowngradeDetails
320
390
  # @private
321
391
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -49,10 +49,17 @@ module Google
49
49
  @batch_path = 'batch'
50
50
  end
51
51
 
52
- # Used by partners to list products that can be resold to their customers. It
53
- # should be called directly by the partner using service accounts.
52
+ # To retrieve the products that can be resold by the partner. It should be
53
+ # autenticated with a service account.
54
54
  # @param [String] parent
55
55
  # Required. The parent, the partner that can resell. Format: partners/`partner`
56
+ # @param [String] filter
57
+ # Optional. Specifies the filters for the products results. The syntax defined
58
+ # in the EBNF grammar: https://google.aip.dev/assets/misc/ebnf-filtering.txt. An
59
+ # error will be thrown if any specified parameter is not supported. Currently,
60
+ # it can only be used by Youtube partners. Allowed parameters are: - regionCodes
61
+ # - zipCode - eligibilityId Multiple parameters can be specified, for example: "
62
+ # regionCodes=US zipCode=94043 eligibilityId=2022H1Campaign"
56
63
  # @param [Fixnum] page_size
57
64
  # Optional. The maximum number of products to return. The service may return
58
65
  # fewer than this value. If unspecified, at most 50 products will be returned.
@@ -78,11 +85,12 @@ module Google
78
85
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
79
86
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
80
87
  # @raise [Google::Apis::AuthorizationError] Authorization is required
81
- def list_partner_products(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
88
+ def list_partner_products(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
82
89
  command = make_simple_command(:get, 'v1/{+parent}/products', options)
83
90
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse::Representation
84
91
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse
85
92
  command.params['parent'] = parent unless parent.nil?
93
+ command.query['filter'] = filter unless filter.nil?
86
94
  command.query['pageSize'] = page_size unless page_size.nil?
87
95
  command.query['pageToken'] = page_token unless page_token.nil?
88
96
  command.query['fields'] = fields unless fields.nil?
@@ -90,16 +98,53 @@ module Google
90
98
  execute_or_queue_command(command, &block)
91
99
  end
92
100
 
93
- # Used by partners to list promotions, such as free trial, that can be applied
94
- # on subscriptions. It should be called directly by the partner using service
95
- # accounts.
101
+ # To find eligible promotions for the current user. The API requires user
102
+ # authorization via OAuth. The user is inferred from the authenticated OAuth
103
+ # credential.
104
+ # @param [String] parent
105
+ # Required. The parent, the partner that can resell. Format: partners/`partner`
106
+ # @param [Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsRequest] google_cloud_payments_reseller_subscription_v1_find_eligible_promotions_request_object
107
+ # @param [String] fields
108
+ # Selector specifying which fields to include in a partial response.
109
+ # @param [String] quota_user
110
+ # Available to use for quota purposes for server-side applications. Can be any
111
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
112
+ # @param [Google::Apis::RequestOptions] options
113
+ # Request-specific options
114
+ #
115
+ # @yield [result, err] Result & error if block supplied
116
+ # @yieldparam result [Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse] parsed result object
117
+ # @yieldparam err [StandardError] error object if request failed
118
+ #
119
+ # @return [Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse]
120
+ #
121
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
122
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
123
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
124
+ def find_partner_promotion_eligible(parent, google_cloud_payments_reseller_subscription_v1_find_eligible_promotions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
125
+ command = make_simple_command(:post, 'v1/{+parent}/promotions:findEligible', options)
126
+ command.request_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsRequest::Representation
127
+ command.request_object = google_cloud_payments_reseller_subscription_v1_find_eligible_promotions_request_object
128
+ command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse::Representation
129
+ command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse
130
+ command.params['parent'] = parent unless parent.nil?
131
+ command.query['fields'] = fields unless fields.nil?
132
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
133
+ execute_or_queue_command(command, &block)
134
+ end
135
+
136
+ # To retrieve the promotions, such as free trial, that can be used by the
137
+ # partner. It should be autenticated with a service account.
96
138
  # @param [String] parent
97
139
  # Required. The parent, the partner that can resell. Format: partners/`partner`
98
140
  # @param [String] filter
99
141
  # Optional. Specifies the filters for the promotion results. The syntax defined
100
- # in the EBNF grammar: https://google.aip.dev/assets/misc/ebnf-filtering.txt.
101
- # Examples: - applicable_products: "sku1" - region_codes: "US" -
102
- # applicable_products: "sku1" AND region_codes: "US"
142
+ # in the EBNF grammar: https://google.aip.dev/assets/misc/ebnf-filtering.txt. An
143
+ # error will be thrown if the specified parameter(s) is not supported. Currently,
144
+ # it can only be used by Youtube partners. Allowed parameters are: -
145
+ # region_codes: "US" - zip_code: "94043" - eligibility_id: "2022H1Campaign"
146
+ # Multiple parameters can be specified, for example: "region_codes=US zip_code=
147
+ # 94043 eligibility_id=2022H1Campaign"
103
148
  # @param [Fixnum] page_size
104
149
  # Optional. The maximum number of promotions to return. The service may return
105
150
  # fewer than this value. If unspecified, at most 50 products will be returned.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-paymentsresellersubscription_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-10 00:00:00.000000000 Z
11
+ date: 2022-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.4'
19
+ version: '0.5'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.4'
29
+ version: '0.5'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-paymentsresellersubscription_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-paymentsresellersubscription_v1/v0.10.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-paymentsresellersubscription_v1/v0.13.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-paymentsresellersubscription_v1
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.3.4
78
+ rubygems_version: 3.3.14
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Payments Reseller Subscription API V1