google-apis-androidpublisher_v3 0.83.0 → 0.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2586,6 +2586,708 @@ module Google
2586
2586
  execute_or_queue_command(command, &block)
2587
2587
  end
2588
2588
 
2589
+ # Deletes one or more one-time products.
2590
+ # @param [String] package_name
2591
+ # Required. The parent app (package name) for which the one-time products should
2592
+ # be deleted. Must be equal to the package_name field on all the OneTimeProduct
2593
+ # resources.
2594
+ # @param [Google::Apis::AndroidpublisherV3::BatchDeleteOneTimeProductsRequest] batch_delete_one_time_products_request_object
2595
+ # @param [String] fields
2596
+ # Selector specifying which fields to include in a partial response.
2597
+ # @param [String] quota_user
2598
+ # Available to use for quota purposes for server-side applications. Can be any
2599
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2600
+ # @param [Google::Apis::RequestOptions] options
2601
+ # Request-specific options
2602
+ #
2603
+ # @yield [result, err] Result & error if block supplied
2604
+ # @yieldparam result [NilClass] No result returned for this method
2605
+ # @yieldparam err [StandardError] error object if request failed
2606
+ #
2607
+ # @return [void]
2608
+ #
2609
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2610
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2611
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2612
+ def batch_onetimeproduct_delete_one_time_products(package_name, batch_delete_one_time_products_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2613
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts:batchDelete', options)
2614
+ command.request_representation = Google::Apis::AndroidpublisherV3::BatchDeleteOneTimeProductsRequest::Representation
2615
+ command.request_object = batch_delete_one_time_products_request_object
2616
+ command.params['packageName'] = package_name unless package_name.nil?
2617
+ command.query['fields'] = fields unless fields.nil?
2618
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2619
+ execute_or_queue_command(command, &block)
2620
+ end
2621
+
2622
+ # Reads one or more one-time products.
2623
+ # @param [String] package_name
2624
+ # Required. The parent app (package name) for which the products should be
2625
+ # retrieved. Must be equal to the package_name field on all requests.
2626
+ # @param [Array<String>, String] product_ids
2627
+ # Required. A list of up to 100 product IDs to retrieve. All IDs must be
2628
+ # different.
2629
+ # @param [String] fields
2630
+ # Selector specifying which fields to include in a partial response.
2631
+ # @param [String] quota_user
2632
+ # Available to use for quota purposes for server-side applications. Can be any
2633
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2634
+ # @param [Google::Apis::RequestOptions] options
2635
+ # Request-specific options
2636
+ #
2637
+ # @yield [result, err] Result & error if block supplied
2638
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::BatchGetOneTimeProductsResponse] parsed result object
2639
+ # @yieldparam err [StandardError] error object if request failed
2640
+ #
2641
+ # @return [Google::Apis::AndroidpublisherV3::BatchGetOneTimeProductsResponse]
2642
+ #
2643
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2644
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2645
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2646
+ def batch_monetization_onetimeproduct_get(package_name, product_ids: nil, fields: nil, quota_user: nil, options: nil, &block)
2647
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts:batchGet', options)
2648
+ command.response_representation = Google::Apis::AndroidpublisherV3::BatchGetOneTimeProductsResponse::Representation
2649
+ command.response_class = Google::Apis::AndroidpublisherV3::BatchGetOneTimeProductsResponse
2650
+ command.params['packageName'] = package_name unless package_name.nil?
2651
+ command.query['productIds'] = product_ids unless product_ids.nil?
2652
+ command.query['fields'] = fields unless fields.nil?
2653
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2654
+ execute_or_queue_command(command, &block)
2655
+ end
2656
+
2657
+ # Creates or updates one or more one-time products.
2658
+ # @param [String] package_name
2659
+ # Required. The parent app (package name) for which the one-time products should
2660
+ # be updated. Must be equal to the package_name field on all the OneTimeProduct
2661
+ # resources.
2662
+ # @param [Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductsRequest] batch_update_one_time_products_request_object
2663
+ # @param [String] fields
2664
+ # Selector specifying which fields to include in a partial response.
2665
+ # @param [String] quota_user
2666
+ # Available to use for quota purposes for server-side applications. Can be any
2667
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2668
+ # @param [Google::Apis::RequestOptions] options
2669
+ # Request-specific options
2670
+ #
2671
+ # @yield [result, err] Result & error if block supplied
2672
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductsResponse] parsed result object
2673
+ # @yieldparam err [StandardError] error object if request failed
2674
+ #
2675
+ # @return [Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductsResponse]
2676
+ #
2677
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2678
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2679
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2680
+ def batch_onetimeproduct_update_one_time_products(package_name, batch_update_one_time_products_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2681
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts:batchUpdate', options)
2682
+ command.request_representation = Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductsRequest::Representation
2683
+ command.request_object = batch_update_one_time_products_request_object
2684
+ command.response_representation = Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductsResponse::Representation
2685
+ command.response_class = Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductsResponse
2686
+ command.params['packageName'] = package_name unless package_name.nil?
2687
+ command.query['fields'] = fields unless fields.nil?
2688
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2689
+ execute_or_queue_command(command, &block)
2690
+ end
2691
+
2692
+ # Deletes a one-time product.
2693
+ # @param [String] package_name
2694
+ # Required. The parent app (package name) of the one-time product to delete.
2695
+ # @param [String] product_id
2696
+ # Required. The one-time product ID of the one-time product to delete.
2697
+ # @param [String] latency_tolerance
2698
+ # Optional. The latency tolerance for the propagation of this product update.
2699
+ # Defaults to latency-sensitive.
2700
+ # @param [String] fields
2701
+ # Selector specifying which fields to include in a partial response.
2702
+ # @param [String] quota_user
2703
+ # Available to use for quota purposes for server-side applications. Can be any
2704
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2705
+ # @param [Google::Apis::RequestOptions] options
2706
+ # Request-specific options
2707
+ #
2708
+ # @yield [result, err] Result & error if block supplied
2709
+ # @yieldparam result [NilClass] No result returned for this method
2710
+ # @yieldparam err [StandardError] error object if request failed
2711
+ #
2712
+ # @return [void]
2713
+ #
2714
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2715
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2716
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2717
+ def delete_monetization_onetimeproduct(package_name, product_id, latency_tolerance: nil, fields: nil, quota_user: nil, options: nil, &block)
2718
+ command = make_simple_command(:delete, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}', options)
2719
+ command.params['packageName'] = package_name unless package_name.nil?
2720
+ command.params['productId'] = product_id unless product_id.nil?
2721
+ command.query['latencyTolerance'] = latency_tolerance unless latency_tolerance.nil?
2722
+ command.query['fields'] = fields unless fields.nil?
2723
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2724
+ execute_or_queue_command(command, &block)
2725
+ end
2726
+
2727
+ # Reads a single one-time product.
2728
+ # @param [String] package_name
2729
+ # Required. The parent app (package name) of the product to retrieve.
2730
+ # @param [String] product_id
2731
+ # Required. The product ID of the product to retrieve.
2732
+ # @param [String] fields
2733
+ # Selector specifying which fields to include in a partial response.
2734
+ # @param [String] quota_user
2735
+ # Available to use for quota purposes for server-side applications. Can be any
2736
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2737
+ # @param [Google::Apis::RequestOptions] options
2738
+ # Request-specific options
2739
+ #
2740
+ # @yield [result, err] Result & error if block supplied
2741
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::OneTimeProduct] parsed result object
2742
+ # @yieldparam err [StandardError] error object if request failed
2743
+ #
2744
+ # @return [Google::Apis::AndroidpublisherV3::OneTimeProduct]
2745
+ #
2746
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2747
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2748
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2749
+ def get_monetization_onetimeproduct(package_name, product_id, fields: nil, quota_user: nil, options: nil, &block)
2750
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}', options)
2751
+ command.response_representation = Google::Apis::AndroidpublisherV3::OneTimeProduct::Representation
2752
+ command.response_class = Google::Apis::AndroidpublisherV3::OneTimeProduct
2753
+ command.params['packageName'] = package_name unless package_name.nil?
2754
+ command.params['productId'] = product_id unless product_id.nil?
2755
+ command.query['fields'] = fields unless fields.nil?
2756
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2757
+ execute_or_queue_command(command, &block)
2758
+ end
2759
+
2760
+ # Lists all one-time products under a given app.
2761
+ # @param [String] package_name
2762
+ # Required. The parent app (package name) for which the one-time product should
2763
+ # be read.
2764
+ # @param [Fixnum] page_size
2765
+ # Optional. The maximum number of one-time product to return. The service may
2766
+ # return fewer than this value. If unspecified, at most 50 one-time products
2767
+ # will be returned. The maximum value is 1000; values above 1000 will be coerced
2768
+ # to 1000.
2769
+ # @param [String] page_token
2770
+ # Optional. A page token, received from a previous `ListOneTimeProducts` call.
2771
+ # Provide this to retrieve the subsequent page. When paginating, all other
2772
+ # parameters provided to `ListOneTimeProducts` must match the call that provided
2773
+ # the page token.
2774
+ # @param [String] fields
2775
+ # Selector specifying which fields to include in a partial response.
2776
+ # @param [String] quota_user
2777
+ # Available to use for quota purposes for server-side applications. Can be any
2778
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2779
+ # @param [Google::Apis::RequestOptions] options
2780
+ # Request-specific options
2781
+ #
2782
+ # @yield [result, err] Result & error if block supplied
2783
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::ListOneTimeProductsResponse] parsed result object
2784
+ # @yieldparam err [StandardError] error object if request failed
2785
+ #
2786
+ # @return [Google::Apis::AndroidpublisherV3::ListOneTimeProductsResponse]
2787
+ #
2788
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2789
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2790
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2791
+ def list_monetization_onetimeproducts(package_name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2792
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts', options)
2793
+ command.response_representation = Google::Apis::AndroidpublisherV3::ListOneTimeProductsResponse::Representation
2794
+ command.response_class = Google::Apis::AndroidpublisherV3::ListOneTimeProductsResponse
2795
+ command.params['packageName'] = package_name unless package_name.nil?
2796
+ command.query['pageSize'] = page_size unless page_size.nil?
2797
+ command.query['pageToken'] = page_token unless page_token.nil?
2798
+ command.query['fields'] = fields unless fields.nil?
2799
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2800
+ execute_or_queue_command(command, &block)
2801
+ end
2802
+
2803
+ # Creates or updates a one-time product.
2804
+ # @param [String] package_name
2805
+ # Required. Immutable. Package name of the parent app.
2806
+ # @param [String] product_id
2807
+ # Required. Immutable. Unique product ID of the product. Unique within the
2808
+ # parent app. Product IDs must start with a number or lowercase letter, and can
2809
+ # contain numbers (0-9), lowercase letters (a-z), underscores (_), and periods (.
2810
+ # ).
2811
+ # @param [Google::Apis::AndroidpublisherV3::OneTimeProduct] one_time_product_object
2812
+ # @param [Boolean] allow_missing
2813
+ # Optional. If set to true, and the one-time product with the given package_name
2814
+ # and product_id doesn't exist, the one-time product will be created. If a new
2815
+ # one-time product is created, update_mask is ignored.
2816
+ # @param [String] latency_tolerance
2817
+ # Optional. The latency tolerance for the propagation of this product upsert.
2818
+ # Defaults to latency-sensitive.
2819
+ # @param [String] regions_version_version
2820
+ # Required. A string representing the version of available regions being used
2821
+ # for the specified resource. Regional prices and latest supported version for
2822
+ # the resource have to be specified according to the information published in [
2823
+ # this article](https://support.google.com/googleplay/android-developer/answer/
2824
+ # 10532353). Each time the supported locations substantially change, the version
2825
+ # will be incremented. Using this field will ensure that creating and updating
2826
+ # the resource with an older region's version and set of regional prices and
2827
+ # currencies will succeed even though a new version is available.
2828
+ # @param [String] update_mask
2829
+ # Required. The list of fields to be updated.
2830
+ # @param [String] fields
2831
+ # Selector specifying which fields to include in a partial response.
2832
+ # @param [String] quota_user
2833
+ # Available to use for quota purposes for server-side applications. Can be any
2834
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2835
+ # @param [Google::Apis::RequestOptions] options
2836
+ # Request-specific options
2837
+ #
2838
+ # @yield [result, err] Result & error if block supplied
2839
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::OneTimeProduct] parsed result object
2840
+ # @yieldparam err [StandardError] error object if request failed
2841
+ #
2842
+ # @return [Google::Apis::AndroidpublisherV3::OneTimeProduct]
2843
+ #
2844
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2845
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2846
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2847
+ def patch_monetization_onetimeproduct(package_name, product_id, one_time_product_object = nil, allow_missing: nil, latency_tolerance: nil, regions_version_version: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2848
+ command = make_simple_command(:patch, 'androidpublisher/v3/applications/{packageName}/onetimeproducts/{productId}', options)
2849
+ command.request_representation = Google::Apis::AndroidpublisherV3::OneTimeProduct::Representation
2850
+ command.request_object = one_time_product_object
2851
+ command.response_representation = Google::Apis::AndroidpublisherV3::OneTimeProduct::Representation
2852
+ command.response_class = Google::Apis::AndroidpublisherV3::OneTimeProduct
2853
+ command.params['packageName'] = package_name unless package_name.nil?
2854
+ command.params['productId'] = product_id unless product_id.nil?
2855
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
2856
+ command.query['latencyTolerance'] = latency_tolerance unless latency_tolerance.nil?
2857
+ command.query['regionsVersion.version'] = regions_version_version unless regions_version_version.nil?
2858
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2859
+ command.query['fields'] = fields unless fields.nil?
2860
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2861
+ execute_or_queue_command(command, &block)
2862
+ end
2863
+
2864
+ # Deletes purchase options across one or multiple one-time products. By default
2865
+ # this operation will fail if there are any existing offers under the deleted
2866
+ # purchase options. Use the force parameter to override the default behavior.
2867
+ # @param [String] package_name
2868
+ # Required. The parent app (package name) of the purchase options to delete.
2869
+ # @param [String] product_id
2870
+ # Required. The product ID of the parent one-time product, if all purchase
2871
+ # options to delete belong to the same one-time product. If this batch delete
2872
+ # spans multiple one-time products, set this field to "-".
2873
+ # @param [Google::Apis::AndroidpublisherV3::BatchDeletePurchaseOptionsRequest] batch_delete_purchase_options_request_object
2874
+ # @param [String] fields
2875
+ # Selector specifying which fields to include in a partial response.
2876
+ # @param [String] quota_user
2877
+ # Available to use for quota purposes for server-side applications. Can be any
2878
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2879
+ # @param [Google::Apis::RequestOptions] options
2880
+ # Request-specific options
2881
+ #
2882
+ # @yield [result, err] Result & error if block supplied
2883
+ # @yieldparam result [NilClass] No result returned for this method
2884
+ # @yieldparam err [StandardError] error object if request failed
2885
+ #
2886
+ # @return [void]
2887
+ #
2888
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2889
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2890
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2891
+ def batch_delete_purchase_options(package_name, product_id, batch_delete_purchase_options_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2892
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions:batchDelete', options)
2893
+ command.request_representation = Google::Apis::AndroidpublisherV3::BatchDeletePurchaseOptionsRequest::Representation
2894
+ command.request_object = batch_delete_purchase_options_request_object
2895
+ command.params['packageName'] = package_name unless package_name.nil?
2896
+ command.params['productId'] = product_id unless product_id.nil?
2897
+ command.query['fields'] = fields unless fields.nil?
2898
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2899
+ execute_or_queue_command(command, &block)
2900
+ end
2901
+
2902
+ # Activates or deactivates purchase options across one or multiple one-time
2903
+ # products.
2904
+ # @param [String] package_name
2905
+ # Required. The parent app (package name) of the updated purchase options.
2906
+ # @param [String] product_id
2907
+ # Required. The product ID of the parent one-time product, if all updated
2908
+ # purchase options belong to the same one-time product. If this batch update
2909
+ # spans multiple one-time products, set this field to "-".
2910
+ # @param [Google::Apis::AndroidpublisherV3::BatchUpdatePurchaseOptionStatesRequest] batch_update_purchase_option_states_request_object
2911
+ # @param [String] fields
2912
+ # Selector specifying which fields to include in a partial response.
2913
+ # @param [String] quota_user
2914
+ # Available to use for quota purposes for server-side applications. Can be any
2915
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2916
+ # @param [Google::Apis::RequestOptions] options
2917
+ # Request-specific options
2918
+ #
2919
+ # @yield [result, err] Result & error if block supplied
2920
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::BatchUpdatePurchaseOptionStatesResponse] parsed result object
2921
+ # @yieldparam err [StandardError] error object if request failed
2922
+ #
2923
+ # @return [Google::Apis::AndroidpublisherV3::BatchUpdatePurchaseOptionStatesResponse]
2924
+ #
2925
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2926
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2927
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2928
+ def batch_monetization_onetimeproduct_purchase_option_update_states(package_name, product_id, batch_update_purchase_option_states_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2929
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions:batchUpdateStates', options)
2930
+ command.request_representation = Google::Apis::AndroidpublisherV3::BatchUpdatePurchaseOptionStatesRequest::Representation
2931
+ command.request_object = batch_update_purchase_option_states_request_object
2932
+ command.response_representation = Google::Apis::AndroidpublisherV3::BatchUpdatePurchaseOptionStatesResponse::Representation
2933
+ command.response_class = Google::Apis::AndroidpublisherV3::BatchUpdatePurchaseOptionStatesResponse
2934
+ command.params['packageName'] = package_name unless package_name.nil?
2935
+ command.params['productId'] = product_id unless product_id.nil?
2936
+ command.query['fields'] = fields unless fields.nil?
2937
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2938
+ execute_or_queue_command(command, &block)
2939
+ end
2940
+
2941
+ # Activates a one-time product offer.
2942
+ # @param [String] package_name
2943
+ # Required. The parent app (package name) of the offer to activate.
2944
+ # @param [String] product_id
2945
+ # Required. The parent one-time product (ID) of the offer to activate.
2946
+ # @param [String] purchase_option_id
2947
+ # Required. The parent purchase option (ID) of the offer to activate.
2948
+ # @param [String] offer_id
2949
+ # Required. The offer ID of the offer to activate.
2950
+ # @param [Google::Apis::AndroidpublisherV3::ActivateOneTimeProductOfferRequest] activate_one_time_product_offer_request_object
2951
+ # @param [String] fields
2952
+ # Selector specifying which fields to include in a partial response.
2953
+ # @param [String] quota_user
2954
+ # Available to use for quota purposes for server-side applications. Can be any
2955
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2956
+ # @param [Google::Apis::RequestOptions] options
2957
+ # Request-specific options
2958
+ #
2959
+ # @yield [result, err] Result & error if block supplied
2960
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::OneTimeProductOffer] parsed result object
2961
+ # @yieldparam err [StandardError] error object if request failed
2962
+ #
2963
+ # @return [Google::Apis::AndroidpublisherV3::OneTimeProductOffer]
2964
+ #
2965
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2966
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2967
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2968
+ def activate_one_time_product_offer(package_name, product_id, purchase_option_id, offer_id, activate_one_time_product_offer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2969
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers/{offerId}:activate', options)
2970
+ command.request_representation = Google::Apis::AndroidpublisherV3::ActivateOneTimeProductOfferRequest::Representation
2971
+ command.request_object = activate_one_time_product_offer_request_object
2972
+ command.response_representation = Google::Apis::AndroidpublisherV3::OneTimeProductOffer::Representation
2973
+ command.response_class = Google::Apis::AndroidpublisherV3::OneTimeProductOffer
2974
+ command.params['packageName'] = package_name unless package_name.nil?
2975
+ command.params['productId'] = product_id unless product_id.nil?
2976
+ command.params['purchaseOptionId'] = purchase_option_id unless purchase_option_id.nil?
2977
+ command.params['offerId'] = offer_id unless offer_id.nil?
2978
+ command.query['fields'] = fields unless fields.nil?
2979
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2980
+ execute_or_queue_command(command, &block)
2981
+ end
2982
+
2983
+ # Deletes one or more one-time product offers.
2984
+ # @param [String] package_name
2985
+ # Required. The parent app (package name) of the offers to delete. Must be equal
2986
+ # to the package_name field on all the OneTimeProductOffer resources.
2987
+ # @param [String] product_id
2988
+ # Required. The product ID of the parent one-time product, if all offers to
2989
+ # delete belong to the same product. If this request spans multiple one-time
2990
+ # products, set this field to "-".
2991
+ # @param [String] purchase_option_id
2992
+ # Required. The parent purchase option (ID) for which the offers should be
2993
+ # deleted. May be specified as '-' to update offers from multiple purchase
2994
+ # options.
2995
+ # @param [Google::Apis::AndroidpublisherV3::BatchDeleteOneTimeProductOffersRequest] batch_delete_one_time_product_offers_request_object
2996
+ # @param [String] fields
2997
+ # Selector specifying which fields to include in a partial response.
2998
+ # @param [String] quota_user
2999
+ # Available to use for quota purposes for server-side applications. Can be any
3000
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3001
+ # @param [Google::Apis::RequestOptions] options
3002
+ # Request-specific options
3003
+ #
3004
+ # @yield [result, err] Result & error if block supplied
3005
+ # @yieldparam result [NilClass] No result returned for this method
3006
+ # @yieldparam err [StandardError] error object if request failed
3007
+ #
3008
+ # @return [void]
3009
+ #
3010
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3011
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3012
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3013
+ def batch_delete_one_time_product_offers(package_name, product_id, purchase_option_id, batch_delete_one_time_product_offers_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3014
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers:batchDelete', options)
3015
+ command.request_representation = Google::Apis::AndroidpublisherV3::BatchDeleteOneTimeProductOffersRequest::Representation
3016
+ command.request_object = batch_delete_one_time_product_offers_request_object
3017
+ command.params['packageName'] = package_name unless package_name.nil?
3018
+ command.params['productId'] = product_id unless product_id.nil?
3019
+ command.params['purchaseOptionId'] = purchase_option_id unless purchase_option_id.nil?
3020
+ command.query['fields'] = fields unless fields.nil?
3021
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3022
+ execute_or_queue_command(command, &block)
3023
+ end
3024
+
3025
+ # Reads one or more one-time product offers.
3026
+ # @param [String] package_name
3027
+ # Required. The parent app (package name) of the updated offers. Must be equal
3028
+ # to the package_name field on all the updated OneTimeProductOffer resources.
3029
+ # @param [String] product_id
3030
+ # Required. The product ID of the parent one-time product, if all updated offers
3031
+ # belong to the same product. If this request spans multiple one-time products,
3032
+ # set this field to "-".
3033
+ # @param [String] purchase_option_id
3034
+ # Required. The parent purchase option (ID) for which the offers should be
3035
+ # updated. May be specified as '-' to update offers from multiple purchase
3036
+ # options.
3037
+ # @param [Google::Apis::AndroidpublisherV3::BatchGetOneTimeProductOffersRequest] batch_get_one_time_product_offers_request_object
3038
+ # @param [String] fields
3039
+ # Selector specifying which fields to include in a partial response.
3040
+ # @param [String] quota_user
3041
+ # Available to use for quota purposes for server-side applications. Can be any
3042
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3043
+ # @param [Google::Apis::RequestOptions] options
3044
+ # Request-specific options
3045
+ #
3046
+ # @yield [result, err] Result & error if block supplied
3047
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::BatchGetOneTimeProductOffersResponse] parsed result object
3048
+ # @yieldparam err [StandardError] error object if request failed
3049
+ #
3050
+ # @return [Google::Apis::AndroidpublisherV3::BatchGetOneTimeProductOffersResponse]
3051
+ #
3052
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3053
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3054
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3055
+ def batch_get_one_time_product_offers(package_name, product_id, purchase_option_id, batch_get_one_time_product_offers_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3056
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers:batchGet', options)
3057
+ command.request_representation = Google::Apis::AndroidpublisherV3::BatchGetOneTimeProductOffersRequest::Representation
3058
+ command.request_object = batch_get_one_time_product_offers_request_object
3059
+ command.response_representation = Google::Apis::AndroidpublisherV3::BatchGetOneTimeProductOffersResponse::Representation
3060
+ command.response_class = Google::Apis::AndroidpublisherV3::BatchGetOneTimeProductOffersResponse
3061
+ command.params['packageName'] = package_name unless package_name.nil?
3062
+ command.params['productId'] = product_id unless product_id.nil?
3063
+ command.params['purchaseOptionId'] = purchase_option_id unless purchase_option_id.nil?
3064
+ command.query['fields'] = fields unless fields.nil?
3065
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3066
+ execute_or_queue_command(command, &block)
3067
+ end
3068
+
3069
+ # Creates or updates one or more one-time product offers.
3070
+ # @param [String] package_name
3071
+ # Required. The parent app (package name) of the updated offers. Must be equal
3072
+ # to the package_name field on all the updated OneTimeProductOffer resources.
3073
+ # @param [String] product_id
3074
+ # Required. The product ID of the parent one-time product, if all updated offers
3075
+ # belong to the same product. If this request spans multiple one-time products,
3076
+ # set this field to "-".
3077
+ # @param [String] purchase_option_id
3078
+ # Required. The parent purchase option (ID) for which the offers should be
3079
+ # updated. May be specified as '-' to update offers from multiple purchase
3080
+ # options.
3081
+ # @param [Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOffersRequest] batch_update_one_time_product_offers_request_object
3082
+ # @param [String] fields
3083
+ # Selector specifying which fields to include in a partial response.
3084
+ # @param [String] quota_user
3085
+ # Available to use for quota purposes for server-side applications. Can be any
3086
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3087
+ # @param [Google::Apis::RequestOptions] options
3088
+ # Request-specific options
3089
+ #
3090
+ # @yield [result, err] Result & error if block supplied
3091
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOffersResponse] parsed result object
3092
+ # @yieldparam err [StandardError] error object if request failed
3093
+ #
3094
+ # @return [Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOffersResponse]
3095
+ #
3096
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3097
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3098
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3099
+ def batch_update_one_time_product_offers(package_name, product_id, purchase_option_id, batch_update_one_time_product_offers_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3100
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers:batchUpdate', options)
3101
+ command.request_representation = Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOffersRequest::Representation
3102
+ command.request_object = batch_update_one_time_product_offers_request_object
3103
+ command.response_representation = Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOffersResponse::Representation
3104
+ command.response_class = Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOffersResponse
3105
+ command.params['packageName'] = package_name unless package_name.nil?
3106
+ command.params['productId'] = product_id unless product_id.nil?
3107
+ command.params['purchaseOptionId'] = purchase_option_id unless purchase_option_id.nil?
3108
+ command.query['fields'] = fields unless fields.nil?
3109
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3110
+ execute_or_queue_command(command, &block)
3111
+ end
3112
+
3113
+ # Updates a batch of one-time product offer states.
3114
+ # @param [String] package_name
3115
+ # Required. The parent app (package name) of the updated one-time product offers.
3116
+ # @param [String] product_id
3117
+ # Required. The product ID of the parent one-time product, if all updated offers
3118
+ # belong to the same one-time product. If this batch update spans multiple one-
3119
+ # time products, set this field to "-".
3120
+ # @param [String] purchase_option_id
3121
+ # Required. The purchase option ID of the parent purchase option, if all updated
3122
+ # offers belong to the same purchase option. If this batch update spans multiple
3123
+ # purchase options, set this field to "-".
3124
+ # @param [Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOfferStatesRequest] batch_update_one_time_product_offer_states_request_object
3125
+ # @param [String] fields
3126
+ # Selector specifying which fields to include in a partial response.
3127
+ # @param [String] quota_user
3128
+ # Available to use for quota purposes for server-side applications. Can be any
3129
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3130
+ # @param [Google::Apis::RequestOptions] options
3131
+ # Request-specific options
3132
+ #
3133
+ # @yield [result, err] Result & error if block supplied
3134
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOfferStatesResponse] parsed result object
3135
+ # @yieldparam err [StandardError] error object if request failed
3136
+ #
3137
+ # @return [Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOfferStatesResponse]
3138
+ #
3139
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3140
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3141
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3142
+ def batch_monetization_onetimeproduct_purchase_option_offer_update_states(package_name, product_id, purchase_option_id, batch_update_one_time_product_offer_states_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3143
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers:batchUpdateStates', options)
3144
+ command.request_representation = Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOfferStatesRequest::Representation
3145
+ command.request_object = batch_update_one_time_product_offer_states_request_object
3146
+ command.response_representation = Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOfferStatesResponse::Representation
3147
+ command.response_class = Google::Apis::AndroidpublisherV3::BatchUpdateOneTimeProductOfferStatesResponse
3148
+ command.params['packageName'] = package_name unless package_name.nil?
3149
+ command.params['productId'] = product_id unless product_id.nil?
3150
+ command.params['purchaseOptionId'] = purchase_option_id unless purchase_option_id.nil?
3151
+ command.query['fields'] = fields unless fields.nil?
3152
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3153
+ execute_or_queue_command(command, &block)
3154
+ end
3155
+
3156
+ # Cancels a one-time product offer.
3157
+ # @param [String] package_name
3158
+ # Required. The parent app (package name) of the offer to cancel.
3159
+ # @param [String] product_id
3160
+ # Required. The parent one-time product (ID) of the offer to cancel.
3161
+ # @param [String] purchase_option_id
3162
+ # Required. The parent purchase option (ID) of the offer to cancel.
3163
+ # @param [String] offer_id
3164
+ # Required. The offer ID of the offer to cancel.
3165
+ # @param [Google::Apis::AndroidpublisherV3::CancelOneTimeProductOfferRequest] cancel_one_time_product_offer_request_object
3166
+ # @param [String] fields
3167
+ # Selector specifying which fields to include in a partial response.
3168
+ # @param [String] quota_user
3169
+ # Available to use for quota purposes for server-side applications. Can be any
3170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3171
+ # @param [Google::Apis::RequestOptions] options
3172
+ # Request-specific options
3173
+ #
3174
+ # @yield [result, err] Result & error if block supplied
3175
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::OneTimeProductOffer] parsed result object
3176
+ # @yieldparam err [StandardError] error object if request failed
3177
+ #
3178
+ # @return [Google::Apis::AndroidpublisherV3::OneTimeProductOffer]
3179
+ #
3180
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3181
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3182
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3183
+ def cancel_one_time_product_offer(package_name, product_id, purchase_option_id, offer_id, cancel_one_time_product_offer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3184
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers/{offerId}:cancel', options)
3185
+ command.request_representation = Google::Apis::AndroidpublisherV3::CancelOneTimeProductOfferRequest::Representation
3186
+ command.request_object = cancel_one_time_product_offer_request_object
3187
+ command.response_representation = Google::Apis::AndroidpublisherV3::OneTimeProductOffer::Representation
3188
+ command.response_class = Google::Apis::AndroidpublisherV3::OneTimeProductOffer
3189
+ command.params['packageName'] = package_name unless package_name.nil?
3190
+ command.params['productId'] = product_id unless product_id.nil?
3191
+ command.params['purchaseOptionId'] = purchase_option_id unless purchase_option_id.nil?
3192
+ command.params['offerId'] = offer_id unless offer_id.nil?
3193
+ command.query['fields'] = fields unless fields.nil?
3194
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3195
+ execute_or_queue_command(command, &block)
3196
+ end
3197
+
3198
+ # Deactivates a one-time product offer.
3199
+ # @param [String] package_name
3200
+ # Required. The parent app (package name) of the offer to deactivate.
3201
+ # @param [String] product_id
3202
+ # Required. The parent one-time product (ID) of the offer to deactivate.
3203
+ # @param [String] purchase_option_id
3204
+ # Required. The parent purchase option (ID) of the offer to deactivate.
3205
+ # @param [String] offer_id
3206
+ # Required. The offer ID of the offer to deactivate.
3207
+ # @param [Google::Apis::AndroidpublisherV3::DeactivateOneTimeProductOfferRequest] deactivate_one_time_product_offer_request_object
3208
+ # @param [String] fields
3209
+ # Selector specifying which fields to include in a partial response.
3210
+ # @param [String] quota_user
3211
+ # Available to use for quota purposes for server-side applications. Can be any
3212
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3213
+ # @param [Google::Apis::RequestOptions] options
3214
+ # Request-specific options
3215
+ #
3216
+ # @yield [result, err] Result & error if block supplied
3217
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::OneTimeProductOffer] parsed result object
3218
+ # @yieldparam err [StandardError] error object if request failed
3219
+ #
3220
+ # @return [Google::Apis::AndroidpublisherV3::OneTimeProductOffer]
3221
+ #
3222
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3223
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3224
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3225
+ def deactivate_one_time_product_offer(package_name, product_id, purchase_option_id, offer_id, deactivate_one_time_product_offer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3226
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers/{offerId}:deactivate', options)
3227
+ command.request_representation = Google::Apis::AndroidpublisherV3::DeactivateOneTimeProductOfferRequest::Representation
3228
+ command.request_object = deactivate_one_time_product_offer_request_object
3229
+ command.response_representation = Google::Apis::AndroidpublisherV3::OneTimeProductOffer::Representation
3230
+ command.response_class = Google::Apis::AndroidpublisherV3::OneTimeProductOffer
3231
+ command.params['packageName'] = package_name unless package_name.nil?
3232
+ command.params['productId'] = product_id unless product_id.nil?
3233
+ command.params['purchaseOptionId'] = purchase_option_id unless purchase_option_id.nil?
3234
+ command.params['offerId'] = offer_id unless offer_id.nil?
3235
+ command.query['fields'] = fields unless fields.nil?
3236
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3237
+ execute_or_queue_command(command, &block)
3238
+ end
3239
+
3240
+ # Lists all offers under a given app, product, or purchase option.
3241
+ # @param [String] package_name
3242
+ # Required. The parent app (package name) for which the offers should be read.
3243
+ # @param [String] product_id
3244
+ # Required. The parent one-time product (ID) for which the offers should be read.
3245
+ # May be specified as '-' to read all offers under an app.
3246
+ # @param [String] purchase_option_id
3247
+ # Required. The parent purchase option (ID) for which the offers should be read.
3248
+ # May be specified as '-' to read all offers under a one-time product or an app.
3249
+ # Must be specified as '-' if product_id is specified as '-'.
3250
+ # @param [Fixnum] page_size
3251
+ # Optional. The maximum number of offers to return. The service may return fewer
3252
+ # than this value. If unspecified, at most 50 offers will be returned. The
3253
+ # maximum value is 1000; values above 1000 will be coerced to 1000.
3254
+ # @param [String] page_token
3255
+ # Optional. A page token, received from a previous `ListOneTimeProductsOffers`
3256
+ # call. Provide this to retrieve the subsequent page. When paginating,
3257
+ # product_id, package_name and purchase_option_id provided to `
3258
+ # ListOneTimeProductsOffersRequest` must match the call that provided the page
3259
+ # token.
3260
+ # @param [String] fields
3261
+ # Selector specifying which fields to include in a partial response.
3262
+ # @param [String] quota_user
3263
+ # Available to use for quota purposes for server-side applications. Can be any
3264
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3265
+ # @param [Google::Apis::RequestOptions] options
3266
+ # Request-specific options
3267
+ #
3268
+ # @yield [result, err] Result & error if block supplied
3269
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::ListOneTimeProductOffersResponse] parsed result object
3270
+ # @yieldparam err [StandardError] error object if request failed
3271
+ #
3272
+ # @return [Google::Apis::AndroidpublisherV3::ListOneTimeProductOffersResponse]
3273
+ #
3274
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3275
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3276
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3277
+ def list_monetization_onetimeproduct_purchase_option_offers(package_name, product_id, purchase_option_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3278
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers', options)
3279
+ command.response_representation = Google::Apis::AndroidpublisherV3::ListOneTimeProductOffersResponse::Representation
3280
+ command.response_class = Google::Apis::AndroidpublisherV3::ListOneTimeProductOffersResponse
3281
+ command.params['packageName'] = package_name unless package_name.nil?
3282
+ command.params['productId'] = product_id unless product_id.nil?
3283
+ command.params['purchaseOptionId'] = purchase_option_id unless purchase_option_id.nil?
3284
+ command.query['pageSize'] = page_size unless page_size.nil?
3285
+ command.query['pageToken'] = page_token unless page_token.nil?
3286
+ command.query['fields'] = fields unless fields.nil?
3287
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3288
+ execute_or_queue_command(command, &block)
3289
+ end
3290
+
2589
3291
  # Deprecated: subscription archiving is not supported.
2590
3292
  # @param [String] package_name
2591
3293
  # Required. The parent app (package name) of the app of the subscription to