google-shopping-merchant-accounts-v1beta 0.a → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +143 -8
  5. data/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb +44 -0
  6. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb +452 -0
  7. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb +49 -0
  8. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb +49 -0
  9. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb +419 -0
  10. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb +130 -0
  11. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb +54 -0
  12. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb +57 -0
  13. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb +57 -0
  14. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb +633 -0
  15. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb +49 -0
  16. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb +66 -0
  17. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb +586 -0
  18. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb +249 -0
  19. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb +58 -0
  20. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb +61 -0
  21. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb +58 -0
  22. data/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb +57 -0
  23. data/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb +47 -0
  24. data/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb +67 -0
  25. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb +942 -0
  26. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb +49 -0
  27. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb +80 -0
  28. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb +890 -0
  29. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb +423 -0
  30. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb +54 -0
  31. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb +57 -0
  32. data/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb +71 -0
  33. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb +525 -0
  34. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb +49 -0
  35. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb +49 -0
  36. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb +485 -0
  37. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb +190 -0
  38. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb +55 -0
  39. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb +58 -0
  40. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb +524 -0
  41. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb +49 -0
  42. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb +49 -0
  43. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb +484 -0
  44. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb +190 -0
  45. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb +54 -0
  46. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb +57 -0
  47. data/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb +56 -0
  48. data/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb +51 -0
  49. data/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb +60 -0
  50. data/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb +50 -0
  51. data/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb +48 -0
  52. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb +539 -0
  53. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb +49 -0
  54. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb +52 -0
  55. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb +499 -0
  56. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb +190 -0
  57. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb +57 -0
  58. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb +60 -0
  59. data/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb +54 -0
  60. data/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb +65 -0
  61. data/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb +55 -0
  62. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb +724 -0
  63. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb +49 -0
  64. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb +49 -0
  65. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb +670 -0
  66. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb +310 -0
  67. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb +54 -0
  68. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb +57 -0
  69. data/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb +66 -0
  70. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb +61 -0
  71. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +551 -0
  72. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb +49 -0
  73. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb +66 -0
  74. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +511 -0
  75. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +189 -0
  76. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +58 -0
  77. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb +61 -0
  78. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +53 -0
  79. data/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb +44 -0
  80. data/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb +56 -0
  81. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb +734 -0
  82. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb +49 -0
  83. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb +66 -0
  84. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb +680 -0
  85. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb +309 -0
  86. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb +64 -0
  87. data/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb +67 -0
  88. data/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb +65 -0
  89. data/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb +63 -0
  90. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb +835 -0
  91. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb +49 -0
  92. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb +66 -0
  93. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb +774 -0
  94. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb +368 -0
  95. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb +58 -0
  96. data/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb +61 -0
  97. data/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb +62 -0
  98. data/lib/google/shopping/merchant/accounts/v1beta/rest.rb +52 -0
  99. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb +526 -0
  100. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb +49 -0
  101. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb +49 -0
  102. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb +486 -0
  103. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb +190 -0
  104. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb +55 -0
  105. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb +58 -0
  106. data/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb +83 -0
  107. data/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb +51 -0
  108. data/lib/google/shopping/merchant/accounts/v1beta/tax_rule_pb.rb +49 -0
  109. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb +522 -0
  110. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb +49 -0
  111. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb +66 -0
  112. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb +482 -0
  113. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb +189 -0
  114. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb +54 -0
  115. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb +57 -0
  116. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb +623 -0
  117. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb +49 -0
  118. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb +63 -0
  119. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb +584 -0
  120. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb +246 -0
  121. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb +54 -0
  122. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb +57 -0
  123. data/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb +54 -0
  124. data/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb +52 -0
  125. data/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb +56 -0
  126. data/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb +49 -0
  127. data/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb +44 -0
  128. data/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb +60 -0
  129. data/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb +838 -0
  130. data/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb +49 -0
  131. data/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb +66 -0
  132. data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb +777 -0
  133. data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb +368 -0
  134. data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb +54 -0
  135. data/lib/google/shopping/merchant/accounts/v1beta/user_service.rb +57 -0
  136. data/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb +58 -0
  137. data/lib/google/shopping/merchant/accounts/v1beta/version.rb +7 -2
  138. data/lib/google/shopping/merchant/accounts/v1beta.rb +60 -0
  139. data/lib/google-shopping-merchant-accounts-v1beta.rb +21 -0
  140. data/proto_docs/README.md +4 -0
  141. data/proto_docs/google/api/client.rb +420 -0
  142. data/proto_docs/google/api/field_behavior.rb +85 -0
  143. data/proto_docs/google/api/launch_stage.rb +71 -0
  144. data/proto_docs/google/api/resource.rb +227 -0
  145. data/proto_docs/google/protobuf/duration.rb +98 -0
  146. data/proto_docs/google/protobuf/empty.rb +34 -0
  147. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  148. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  149. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  150. data/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb +43 -0
  151. data/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb +101 -0
  152. data/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb +142 -0
  153. data/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb +219 -0
  154. data/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb +129 -0
  155. data/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb +72 -0
  156. data/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb +43 -0
  157. data/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb +82 -0
  158. data/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb +87 -0
  159. data/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +238 -0
  160. data/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb +40 -0
  161. data/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb +160 -0
  162. data/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb +195 -0
  163. data/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb +743 -0
  164. data/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb +88 -0
  165. data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb +99 -0
  166. data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb +132 -0
  167. data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb +37 -0
  168. data/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb +156 -0
  169. data/proto_docs/google/shopping/type/types.rb +210 -0
  170. data/proto_docs/google/type/date.rb +53 -0
  171. data/proto_docs/google/type/datetime.rb +99 -0
  172. data/proto_docs/google/type/interval.rb +45 -0
  173. data/proto_docs/google/type/phone_number.rb +112 -0
  174. data/proto_docs/google/type/postal_address.rb +135 -0
  175. metadata +234 -10
@@ -0,0 +1,777 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/shopping/merchant/accounts/v1beta/user_pb"
21
+ require "google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module Accounts
27
+ module V1beta
28
+ module UserService
29
+ module Rest
30
+ ##
31
+ # REST client for the UserService service.
32
+ #
33
+ # Service to support user API.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :user_service_stub
46
+
47
+ ##
48
+ # Configure the UserService Client class.
49
+ #
50
+ # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all UserService clients
56
+ # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config
77
+ end
78
+ yield @configure if block_given?
79
+ @configure
80
+ end
81
+
82
+ ##
83
+ # Configure the UserService Client instance.
84
+ #
85
+ # The configuration is set to the derived mode, meaning that values can be changed,
86
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
87
+ # should be made on {Client.configure}.
88
+ #
89
+ # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration}
90
+ # for a description of the configuration fields.
91
+ #
92
+ # @yield [config] Configure the Client client.
93
+ # @yieldparam config [Client::Configuration]
94
+ #
95
+ # @return [Client::Configuration]
96
+ #
97
+ def configure
98
+ yield @config if block_given?
99
+ @config
100
+ end
101
+
102
+ ##
103
+ # The effective universe domain
104
+ #
105
+ # @return [String]
106
+ #
107
+ def universe_domain
108
+ @user_service_stub.universe_domain
109
+ end
110
+
111
+ ##
112
+ # Create a new UserService REST client object.
113
+ #
114
+ # @example
115
+ #
116
+ # # Create a client using the default configuration
117
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new
118
+ #
119
+ # # Create a client using a custom configuration
120
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config|
121
+ # config.timeout = 10.0
122
+ # end
123
+ #
124
+ # @yield [config] Configure the UserService client.
125
+ # @yieldparam config [Client::Configuration]
126
+ #
127
+ def initialize
128
+ # Create the configuration object
129
+ @config = Configuration.new Client.configure
130
+
131
+ # Yield the configuration if needed
132
+ yield @config if block_given?
133
+
134
+ # Create credentials
135
+ credentials = @config.credentials
136
+ # Use self-signed JWT if the endpoint is unchanged from default,
137
+ # but only if the default endpoint does not have a region prefix.
138
+ enable_self_signed_jwt = @config.endpoint.nil? ||
139
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
140
+ !@config.endpoint.split(".").first.include?("-"))
141
+ credentials ||= Credentials.default scope: @config.scope,
142
+ enable_self_signed_jwt: enable_self_signed_jwt
143
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
144
+ credentials = Credentials.new credentials, scope: @config.scope
145
+ end
146
+
147
+ @quota_project_id = @config.quota_project
148
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
149
+
150
+ @user_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.new(
151
+ endpoint: @config.endpoint,
152
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
153
+ universe_domain: @config.universe_domain,
154
+ credentials: credentials
155
+ )
156
+ end
157
+
158
+ # Service calls
159
+
160
+ ##
161
+ # Retrieves a Merchant Center account user.
162
+ #
163
+ # @overload get_user(request, options = nil)
164
+ # Pass arguments to `get_user` via a request object, either of type
165
+ # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash.
166
+ #
167
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash]
168
+ # A request object representing the call parameters. Required. To specify no
169
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
170
+ # @param options [::Gapic::CallOptions, ::Hash]
171
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
172
+ #
173
+ # @overload get_user(name: nil)
174
+ # Pass arguments to `get_user` via keyword arguments. Note that at
175
+ # least one keyword argument is required. To specify no parameters, or to keep all
176
+ # the default parameter values, pass an empty Hash as a request object (see above).
177
+ #
178
+ # @param name [::String]
179
+ # Required. The name of the user to retrieve.
180
+ # Format: `accounts/{account}/users/{email}`
181
+ #
182
+ # It is also possible to retrieve the user corresponding to the caller by
183
+ # using `me` rather than an email address as in
184
+ # `accounts/{account}/users/me`.
185
+ # @yield [result, operation] Access the result along with the TransportOperation object
186
+ # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User]
187
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
188
+ #
189
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::User]
190
+ #
191
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
192
+ #
193
+ # @example Basic example
194
+ # require "google/shopping/merchant/accounts/v1beta"
195
+ #
196
+ # # Create a client object. The client can be reused for multiple calls.
197
+ # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new
198
+ #
199
+ # # Create a request. To set request fields, pass in keyword arguments.
200
+ # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new
201
+ #
202
+ # # Call the get_user method.
203
+ # result = client.get_user request
204
+ #
205
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User.
206
+ # p result
207
+ #
208
+ def get_user request, options = nil
209
+ raise ::ArgumentError, "request must be provided" if request.nil?
210
+
211
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest
212
+
213
+ # Converts hash and nil to an options object
214
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
215
+
216
+ # Customize the options with defaults
217
+ call_metadata = @config.rpcs.get_user.metadata.to_h
218
+
219
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
220
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
221
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
222
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
223
+ transports_version_send: [:rest]
224
+
225
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
226
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
227
+
228
+ options.apply_defaults timeout: @config.rpcs.get_user.timeout,
229
+ metadata: call_metadata,
230
+ retry_policy: @config.rpcs.get_user.retry_policy
231
+
232
+ options.apply_defaults timeout: @config.timeout,
233
+ metadata: @config.metadata,
234
+ retry_policy: @config.retry_policy
235
+
236
+ @user_service_stub.get_user request, options do |result, operation|
237
+ yield result, operation if block_given?
238
+ return result
239
+ end
240
+ rescue ::Gapic::Rest::Error => e
241
+ raise ::Google::Cloud::Error.from_error(e)
242
+ end
243
+
244
+ ##
245
+ # Creates a Merchant Center account user. Executing this method requires
246
+ # admin access.
247
+ #
248
+ # @overload create_user(request, options = nil)
249
+ # Pass arguments to `create_user` via a request object, either of type
250
+ # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash.
251
+ #
252
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash]
253
+ # A request object representing the call parameters. Required. To specify no
254
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
255
+ # @param options [::Gapic::CallOptions, ::Hash]
256
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
257
+ #
258
+ # @overload create_user(parent: nil, user_id: nil, user: nil)
259
+ # Pass arguments to `create_user` via keyword arguments. Note that at
260
+ # least one keyword argument is required. To specify no parameters, or to keep all
261
+ # the default parameter values, pass an empty Hash as a request object (see above).
262
+ #
263
+ # @param parent [::String]
264
+ # Required. The resource name of the account for which a user will be
265
+ # created. Format: `accounts/{account}`
266
+ # @param user_id [::String]
267
+ # Required. The email address of the user (for example,
268
+ # `john.doe@gmail.com`).
269
+ # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash]
270
+ # Required. The user to create.
271
+ # @yield [result, operation] Access the result along with the TransportOperation object
272
+ # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User]
273
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
274
+ #
275
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::User]
276
+ #
277
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
278
+ #
279
+ # @example Basic example
280
+ # require "google/shopping/merchant/accounts/v1beta"
281
+ #
282
+ # # Create a client object. The client can be reused for multiple calls.
283
+ # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new
284
+ #
285
+ # # Create a request. To set request fields, pass in keyword arguments.
286
+ # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new
287
+ #
288
+ # # Call the create_user method.
289
+ # result = client.create_user request
290
+ #
291
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User.
292
+ # p result
293
+ #
294
+ def create_user request, options = nil
295
+ raise ::ArgumentError, "request must be provided" if request.nil?
296
+
297
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest
298
+
299
+ # Converts hash and nil to an options object
300
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
301
+
302
+ # Customize the options with defaults
303
+ call_metadata = @config.rpcs.create_user.metadata.to_h
304
+
305
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
306
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
307
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
308
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
309
+ transports_version_send: [:rest]
310
+
311
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
312
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
313
+
314
+ options.apply_defaults timeout: @config.rpcs.create_user.timeout,
315
+ metadata: call_metadata,
316
+ retry_policy: @config.rpcs.create_user.retry_policy
317
+
318
+ options.apply_defaults timeout: @config.timeout,
319
+ metadata: @config.metadata,
320
+ retry_policy: @config.retry_policy
321
+
322
+ @user_service_stub.create_user request, options do |result, operation|
323
+ yield result, operation if block_given?
324
+ return result
325
+ end
326
+ rescue ::Gapic::Rest::Error => e
327
+ raise ::Google::Cloud::Error.from_error(e)
328
+ end
329
+
330
+ ##
331
+ # Deletes a Merchant Center account user. Executing this method requires
332
+ # admin access.
333
+ #
334
+ # @overload delete_user(request, options = nil)
335
+ # Pass arguments to `delete_user` via a request object, either of type
336
+ # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash.
337
+ #
338
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash]
339
+ # A request object representing the call parameters. Required. To specify no
340
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
341
+ # @param options [::Gapic::CallOptions, ::Hash]
342
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
343
+ #
344
+ # @overload delete_user(name: nil)
345
+ # Pass arguments to `delete_user` via keyword arguments. Note that at
346
+ # least one keyword argument is required. To specify no parameters, or to keep all
347
+ # the default parameter values, pass an empty Hash as a request object (see above).
348
+ #
349
+ # @param name [::String]
350
+ # Required. The name of the user to delete.
351
+ # Format: `accounts/{account}/users/{email}`
352
+ #
353
+ # It is also possible to delete the user corresponding to the caller by using
354
+ # `me` rather than an email address as in `accounts/{account}/users/me`.
355
+ # @yield [result, operation] Access the result along with the TransportOperation object
356
+ # @yieldparam result [::Google::Protobuf::Empty]
357
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
358
+ #
359
+ # @return [::Google::Protobuf::Empty]
360
+ #
361
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
362
+ #
363
+ # @example Basic example
364
+ # require "google/shopping/merchant/accounts/v1beta"
365
+ #
366
+ # # Create a client object. The client can be reused for multiple calls.
367
+ # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new
368
+ #
369
+ # # Create a request. To set request fields, pass in keyword arguments.
370
+ # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new
371
+ #
372
+ # # Call the delete_user method.
373
+ # result = client.delete_user request
374
+ #
375
+ # # The returned object is of type Google::Protobuf::Empty.
376
+ # p result
377
+ #
378
+ def delete_user request, options = nil
379
+ raise ::ArgumentError, "request must be provided" if request.nil?
380
+
381
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest
382
+
383
+ # Converts hash and nil to an options object
384
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
385
+
386
+ # Customize the options with defaults
387
+ call_metadata = @config.rpcs.delete_user.metadata.to_h
388
+
389
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
390
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
391
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
392
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
393
+ transports_version_send: [:rest]
394
+
395
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
396
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
397
+
398
+ options.apply_defaults timeout: @config.rpcs.delete_user.timeout,
399
+ metadata: call_metadata,
400
+ retry_policy: @config.rpcs.delete_user.retry_policy
401
+
402
+ options.apply_defaults timeout: @config.timeout,
403
+ metadata: @config.metadata,
404
+ retry_policy: @config.retry_policy
405
+
406
+ @user_service_stub.delete_user request, options do |result, operation|
407
+ yield result, operation if block_given?
408
+ return result
409
+ end
410
+ rescue ::Gapic::Rest::Error => e
411
+ raise ::Google::Cloud::Error.from_error(e)
412
+ end
413
+
414
+ ##
415
+ # Updates a Merchant Center account user. Executing this method requires
416
+ # admin access.
417
+ #
418
+ # @overload update_user(request, options = nil)
419
+ # Pass arguments to `update_user` via a request object, either of type
420
+ # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash.
421
+ #
422
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash]
423
+ # A request object representing the call parameters. Required. To specify no
424
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
425
+ # @param options [::Gapic::CallOptions, ::Hash]
426
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
427
+ #
428
+ # @overload update_user(user: nil, update_mask: nil)
429
+ # Pass arguments to `update_user` via keyword arguments. Note that at
430
+ # least one keyword argument is required. To specify no parameters, or to keep all
431
+ # the default parameter values, pass an empty Hash as a request object (see above).
432
+ #
433
+ # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash]
434
+ # Required. The new version of the user.
435
+ #
436
+ # Use `me` to refer to your own email address, for example
437
+ # `accounts/{account}/users/me`.
438
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
439
+ # Required. List of fields being updated.
440
+ # @yield [result, operation] Access the result along with the TransportOperation object
441
+ # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User]
442
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
443
+ #
444
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::User]
445
+ #
446
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
447
+ #
448
+ # @example Basic example
449
+ # require "google/shopping/merchant/accounts/v1beta"
450
+ #
451
+ # # Create a client object. The client can be reused for multiple calls.
452
+ # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new
453
+ #
454
+ # # Create a request. To set request fields, pass in keyword arguments.
455
+ # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new
456
+ #
457
+ # # Call the update_user method.
458
+ # result = client.update_user request
459
+ #
460
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User.
461
+ # p result
462
+ #
463
+ def update_user request, options = nil
464
+ raise ::ArgumentError, "request must be provided" if request.nil?
465
+
466
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest
467
+
468
+ # Converts hash and nil to an options object
469
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
470
+
471
+ # Customize the options with defaults
472
+ call_metadata = @config.rpcs.update_user.metadata.to_h
473
+
474
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
475
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
476
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
477
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
478
+ transports_version_send: [:rest]
479
+
480
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
481
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
482
+
483
+ options.apply_defaults timeout: @config.rpcs.update_user.timeout,
484
+ metadata: call_metadata,
485
+ retry_policy: @config.rpcs.update_user.retry_policy
486
+
487
+ options.apply_defaults timeout: @config.timeout,
488
+ metadata: @config.metadata,
489
+ retry_policy: @config.retry_policy
490
+
491
+ @user_service_stub.update_user request, options do |result, operation|
492
+ yield result, operation if block_given?
493
+ return result
494
+ end
495
+ rescue ::Gapic::Rest::Error => e
496
+ raise ::Google::Cloud::Error.from_error(e)
497
+ end
498
+
499
+ ##
500
+ # Lists all users of a Merchant Center account.
501
+ #
502
+ # @overload list_users(request, options = nil)
503
+ # Pass arguments to `list_users` via a request object, either of type
504
+ # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash.
505
+ #
506
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash]
507
+ # A request object representing the call parameters. Required. To specify no
508
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
509
+ # @param options [::Gapic::CallOptions, ::Hash]
510
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
511
+ #
512
+ # @overload list_users(parent: nil, page_size: nil, page_token: nil)
513
+ # Pass arguments to `list_users` via keyword arguments. Note that at
514
+ # least one keyword argument is required. To specify no parameters, or to keep all
515
+ # the default parameter values, pass an empty Hash as a request object (see above).
516
+ #
517
+ # @param parent [::String]
518
+ # Required. The parent, which owns this collection of users.
519
+ # Format: `accounts/{account}`
520
+ # @param page_size [::Integer]
521
+ # Optional. The maximum number of users to return. The service may return
522
+ # fewer than this value. If unspecified, at most 50 users will be returned.
523
+ # The maximum value is 100; values above 100 will be coerced to 100
524
+ # @param page_token [::String]
525
+ # Optional. A page token, received from a previous `ListUsers` call.
526
+ # Provide this to retrieve the subsequent page.
527
+ #
528
+ # When paginating, all other parameters provided to `ListUsers` must match
529
+ # the call that provided the page token.
530
+ # @yield [result, operation] Access the result along with the TransportOperation object
531
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>]
532
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
533
+ #
534
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>]
535
+ #
536
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
537
+ #
538
+ # @example Basic example
539
+ # require "google/shopping/merchant/accounts/v1beta"
540
+ #
541
+ # # Create a client object. The client can be reused for multiple calls.
542
+ # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new
543
+ #
544
+ # # Create a request. To set request fields, pass in keyword arguments.
545
+ # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new
546
+ #
547
+ # # Call the list_users method.
548
+ # result = client.list_users request
549
+ #
550
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
551
+ # # over elements, and API calls will be issued to fetch pages as needed.
552
+ # result.each do |item|
553
+ # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User.
554
+ # p item
555
+ # end
556
+ #
557
+ def list_users request, options = nil
558
+ raise ::ArgumentError, "request must be provided" if request.nil?
559
+
560
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest
561
+
562
+ # Converts hash and nil to an options object
563
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
564
+
565
+ # Customize the options with defaults
566
+ call_metadata = @config.rpcs.list_users.metadata.to_h
567
+
568
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
569
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
570
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
571
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
572
+ transports_version_send: [:rest]
573
+
574
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
575
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
576
+
577
+ options.apply_defaults timeout: @config.rpcs.list_users.timeout,
578
+ metadata: call_metadata,
579
+ retry_policy: @config.rpcs.list_users.retry_policy
580
+
581
+ options.apply_defaults timeout: @config.timeout,
582
+ metadata: @config.metadata,
583
+ retry_policy: @config.retry_policy
584
+
585
+ @user_service_stub.list_users request, options do |result, operation|
586
+ result = ::Gapic::Rest::PagedEnumerable.new @user_service_stub, :list_users, "users", request, result, options
587
+ yield result, operation if block_given?
588
+ return result
589
+ end
590
+ rescue ::Gapic::Rest::Error => e
591
+ raise ::Google::Cloud::Error.from_error(e)
592
+ end
593
+
594
+ ##
595
+ # Configuration class for the UserService REST API.
596
+ #
597
+ # This class represents the configuration for UserService REST,
598
+ # providing control over timeouts, retry behavior, logging, transport
599
+ # parameters, and other low-level controls. Certain parameters can also be
600
+ # applied individually to specific RPCs. See
601
+ # {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration::Rpcs}
602
+ # for a list of RPCs that can be configured independently.
603
+ #
604
+ # Configuration can be applied globally to all clients, or to a single client
605
+ # on construction.
606
+ #
607
+ # @example
608
+ #
609
+ # # Modify the global config, setting the timeout for
610
+ # # get_user to 20 seconds,
611
+ # # and all remaining timeouts to 10 seconds.
612
+ # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.configure do |config|
613
+ # config.timeout = 10.0
614
+ # config.rpcs.get_user.timeout = 20.0
615
+ # end
616
+ #
617
+ # # Apply the above configuration only to a new client.
618
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config|
619
+ # config.timeout = 10.0
620
+ # config.rpcs.get_user.timeout = 20.0
621
+ # end
622
+ #
623
+ # @!attribute [rw] endpoint
624
+ # A custom service endpoint, as a hostname or hostname:port. The default is
625
+ # nil, indicating to use the default endpoint in the current universe domain.
626
+ # @return [::String,nil]
627
+ # @!attribute [rw] credentials
628
+ # Credentials to send with calls. You may provide any of the following types:
629
+ # * (`String`) The path to a service account key file in JSON format
630
+ # * (`Hash`) A service account key as a Hash
631
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
632
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
633
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
634
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
635
+ # * (`nil`) indicating no credentials
636
+ # @return [::Object]
637
+ # @!attribute [rw] scope
638
+ # The OAuth scopes
639
+ # @return [::Array<::String>]
640
+ # @!attribute [rw] lib_name
641
+ # The library name as recorded in instrumentation and logging
642
+ # @return [::String]
643
+ # @!attribute [rw] lib_version
644
+ # The library version as recorded in instrumentation and logging
645
+ # @return [::String]
646
+ # @!attribute [rw] timeout
647
+ # The call timeout in seconds.
648
+ # @return [::Numeric]
649
+ # @!attribute [rw] metadata
650
+ # Additional headers to be sent with the call.
651
+ # @return [::Hash{::Symbol=>::String}]
652
+ # @!attribute [rw] retry_policy
653
+ # The retry policy. The value is a hash with the following keys:
654
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
655
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
656
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
657
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
658
+ # trigger a retry.
659
+ # @return [::Hash]
660
+ # @!attribute [rw] quota_project
661
+ # A separate project against which to charge quota.
662
+ # @return [::String]
663
+ # @!attribute [rw] universe_domain
664
+ # The universe domain within which to make requests. This determines the
665
+ # default endpoint URL. The default value of nil uses the environment
666
+ # universe (usually the default "googleapis.com" universe).
667
+ # @return [::String,nil]
668
+ #
669
+ class Configuration
670
+ extend ::Gapic::Config
671
+
672
+ # @private
673
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
674
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
675
+
676
+ config_attr :endpoint, nil, ::String, nil
677
+ config_attr :credentials, nil do |value|
678
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
679
+ allowed.any? { |klass| klass === value }
680
+ end
681
+ config_attr :scope, nil, ::String, ::Array, nil
682
+ config_attr :lib_name, nil, ::String, nil
683
+ config_attr :lib_version, nil, ::String, nil
684
+ config_attr :timeout, nil, ::Numeric, nil
685
+ config_attr :metadata, nil, ::Hash, nil
686
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
687
+ config_attr :quota_project, nil, ::String, nil
688
+ config_attr :universe_domain, nil, ::String, nil
689
+
690
+ # @private
691
+ def initialize parent_config = nil
692
+ @parent_config = parent_config unless parent_config.nil?
693
+
694
+ yield self if block_given?
695
+ end
696
+
697
+ ##
698
+ # Configurations for individual RPCs
699
+ # @return [Rpcs]
700
+ #
701
+ def rpcs
702
+ @rpcs ||= begin
703
+ parent_rpcs = nil
704
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
705
+ Rpcs.new parent_rpcs
706
+ end
707
+ end
708
+
709
+ ##
710
+ # Configuration RPC class for the UserService API.
711
+ #
712
+ # Includes fields providing the configuration for each RPC in this service.
713
+ # Each configuration object is of type `Gapic::Config::Method` and includes
714
+ # the following configuration fields:
715
+ #
716
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
717
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
718
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
719
+ # include the following keys:
720
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
721
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
722
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
723
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
724
+ # trigger a retry.
725
+ #
726
+ class Rpcs
727
+ ##
728
+ # RPC-specific configuration for `get_user`
729
+ # @return [::Gapic::Config::Method]
730
+ #
731
+ attr_reader :get_user
732
+ ##
733
+ # RPC-specific configuration for `create_user`
734
+ # @return [::Gapic::Config::Method]
735
+ #
736
+ attr_reader :create_user
737
+ ##
738
+ # RPC-specific configuration for `delete_user`
739
+ # @return [::Gapic::Config::Method]
740
+ #
741
+ attr_reader :delete_user
742
+ ##
743
+ # RPC-specific configuration for `update_user`
744
+ # @return [::Gapic::Config::Method]
745
+ #
746
+ attr_reader :update_user
747
+ ##
748
+ # RPC-specific configuration for `list_users`
749
+ # @return [::Gapic::Config::Method]
750
+ #
751
+ attr_reader :list_users
752
+
753
+ # @private
754
+ def initialize parent_rpcs = nil
755
+ get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user
756
+ @get_user = ::Gapic::Config::Method.new get_user_config
757
+ create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user
758
+ @create_user = ::Gapic::Config::Method.new create_user_config
759
+ delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user
760
+ @delete_user = ::Gapic::Config::Method.new delete_user_config
761
+ update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user
762
+ @update_user = ::Gapic::Config::Method.new update_user_config
763
+ list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
764
+ @list_users = ::Gapic::Config::Method.new list_users_config
765
+
766
+ yield self if block_given?
767
+ end
768
+ end
769
+ end
770
+ end
771
+ end
772
+ end
773
+ end
774
+ end
775
+ end
776
+ end
777
+ end