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

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 +144 -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 +399 -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 +222 -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,419 @@
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/accountissue_pb"
21
+ require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module Accounts
27
+ module V1beta
28
+ module AccountIssueService
29
+ module Rest
30
+ ##
31
+ # REST client for the AccountIssueService service.
32
+ #
33
+ # Service to support `AccountIssueService` 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 :account_issue_service_stub
46
+
47
+ ##
48
+ # Configure the AccountIssueService Client class.
49
+ #
50
+ # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all AccountIssueService clients
56
+ # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 AccountIssueService 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::AccountIssueService::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
+ @account_issue_service_stub.universe_domain
109
+ end
110
+
111
+ ##
112
+ # Create a new AccountIssueService REST client object.
113
+ #
114
+ # @example
115
+ #
116
+ # # Create a client using the default configuration
117
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new
118
+ #
119
+ # # Create a client using a custom configuration
120
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config|
121
+ # config.timeout = 10.0
122
+ # end
123
+ #
124
+ # @yield [config] Configure the AccountIssueService 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
+ @account_issue_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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
+ # Lists all account issues of a Merchant Center account.
162
+ #
163
+ # @overload list_account_issues(request, options = nil)
164
+ # Pass arguments to `list_account_issues` via a request object, either of type
165
+ # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash.
166
+ #
167
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::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 list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil)
174
+ # Pass arguments to `list_account_issues` 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 parent [::String]
179
+ # Required. The parent, which owns this collection of issues.
180
+ # Format: `accounts/{account}`
181
+ # @param page_size [::Integer]
182
+ # Optional. The maximum number of issues to return. The service may return
183
+ # fewer than this value. If unspecified, at most 50 users will be returned.
184
+ # The maximum value is 100; values above 100 will be coerced to 100
185
+ # @param page_token [::String]
186
+ # Optional. A page token, received from a previous `ListAccountIssues` call.
187
+ # Provide this to retrieve the subsequent page.
188
+ #
189
+ # When paginating, all other parameters provided to `ListAccountIssues` must
190
+ # match the call that provided the page token.
191
+ # @param language_code [::String]
192
+ # Optional. The issues in the response will have human-readable fields in the
193
+ # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47),
194
+ # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be
195
+ # used.
196
+ # @param time_zone [::Google::Type::TimeZone, ::Hash]
197
+ # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to
198
+ # localize times in human-readable fields. For example 'America/Los_Angeles'.
199
+ # If not set, 'America/Los_Angeles' will be used.
200
+ # @yield [result, operation] Access the result along with the TransportOperation object
201
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>]
202
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
203
+ #
204
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>]
205
+ #
206
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
207
+ #
208
+ # @example Basic example
209
+ # require "google/shopping/merchant/accounts/v1beta"
210
+ #
211
+ # # Create a client object. The client can be reused for multiple calls.
212
+ # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new
213
+ #
214
+ # # Create a request. To set request fields, pass in keyword arguments.
215
+ # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new
216
+ #
217
+ # # Call the list_account_issues method.
218
+ # result = client.list_account_issues request
219
+ #
220
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
221
+ # # over elements, and API calls will be issued to fetch pages as needed.
222
+ # result.each do |item|
223
+ # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue.
224
+ # p item
225
+ # end
226
+ #
227
+ def list_account_issues request, options = nil
228
+ raise ::ArgumentError, "request must be provided" if request.nil?
229
+
230
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest
231
+
232
+ # Converts hash and nil to an options object
233
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
234
+
235
+ # Customize the options with defaults
236
+ call_metadata = @config.rpcs.list_account_issues.metadata.to_h
237
+
238
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
239
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
240
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
241
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
242
+ transports_version_send: [:rest]
243
+
244
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
245
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
246
+
247
+ options.apply_defaults timeout: @config.rpcs.list_account_issues.timeout,
248
+ metadata: call_metadata,
249
+ retry_policy: @config.rpcs.list_account_issues.retry_policy
250
+
251
+ options.apply_defaults timeout: @config.timeout,
252
+ metadata: @config.metadata,
253
+ retry_policy: @config.retry_policy
254
+
255
+ @account_issue_service_stub.list_account_issues request, options do |result, operation|
256
+ result = ::Gapic::Rest::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, "account_issues", request, result, options
257
+ yield result, operation if block_given?
258
+ return result
259
+ end
260
+ rescue ::Gapic::Rest::Error => e
261
+ raise ::Google::Cloud::Error.from_error(e)
262
+ end
263
+
264
+ ##
265
+ # Configuration class for the AccountIssueService REST API.
266
+ #
267
+ # This class represents the configuration for AccountIssueService REST,
268
+ # providing control over timeouts, retry behavior, logging, transport
269
+ # parameters, and other low-level controls. Certain parameters can also be
270
+ # applied individually to specific RPCs. See
271
+ # {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration::Rpcs}
272
+ # for a list of RPCs that can be configured independently.
273
+ #
274
+ # Configuration can be applied globally to all clients, or to a single client
275
+ # on construction.
276
+ #
277
+ # @example
278
+ #
279
+ # # Modify the global config, setting the timeout for
280
+ # # list_account_issues to 20 seconds,
281
+ # # and all remaining timeouts to 10 seconds.
282
+ # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.configure do |config|
283
+ # config.timeout = 10.0
284
+ # config.rpcs.list_account_issues.timeout = 20.0
285
+ # end
286
+ #
287
+ # # Apply the above configuration only to a new client.
288
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config|
289
+ # config.timeout = 10.0
290
+ # config.rpcs.list_account_issues.timeout = 20.0
291
+ # end
292
+ #
293
+ # @!attribute [rw] endpoint
294
+ # A custom service endpoint, as a hostname or hostname:port. The default is
295
+ # nil, indicating to use the default endpoint in the current universe domain.
296
+ # @return [::String,nil]
297
+ # @!attribute [rw] credentials
298
+ # Credentials to send with calls. You may provide any of the following types:
299
+ # * (`String`) The path to a service account key file in JSON format
300
+ # * (`Hash`) A service account key as a Hash
301
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
302
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
303
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
304
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
305
+ # * (`nil`) indicating no credentials
306
+ # @return [::Object]
307
+ # @!attribute [rw] scope
308
+ # The OAuth scopes
309
+ # @return [::Array<::String>]
310
+ # @!attribute [rw] lib_name
311
+ # The library name as recorded in instrumentation and logging
312
+ # @return [::String]
313
+ # @!attribute [rw] lib_version
314
+ # The library version as recorded in instrumentation and logging
315
+ # @return [::String]
316
+ # @!attribute [rw] timeout
317
+ # The call timeout in seconds.
318
+ # @return [::Numeric]
319
+ # @!attribute [rw] metadata
320
+ # Additional headers to be sent with the call.
321
+ # @return [::Hash{::Symbol=>::String}]
322
+ # @!attribute [rw] retry_policy
323
+ # The retry policy. The value is a hash with the following keys:
324
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
325
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
326
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
327
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
328
+ # trigger a retry.
329
+ # @return [::Hash]
330
+ # @!attribute [rw] quota_project
331
+ # A separate project against which to charge quota.
332
+ # @return [::String]
333
+ # @!attribute [rw] universe_domain
334
+ # The universe domain within which to make requests. This determines the
335
+ # default endpoint URL. The default value of nil uses the environment
336
+ # universe (usually the default "googleapis.com" universe).
337
+ # @return [::String,nil]
338
+ #
339
+ class Configuration
340
+ extend ::Gapic::Config
341
+
342
+ # @private
343
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
344
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
345
+
346
+ config_attr :endpoint, nil, ::String, nil
347
+ config_attr :credentials, nil do |value|
348
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
349
+ allowed.any? { |klass| klass === value }
350
+ end
351
+ config_attr :scope, nil, ::String, ::Array, nil
352
+ config_attr :lib_name, nil, ::String, nil
353
+ config_attr :lib_version, nil, ::String, nil
354
+ config_attr :timeout, nil, ::Numeric, nil
355
+ config_attr :metadata, nil, ::Hash, nil
356
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
357
+ config_attr :quota_project, nil, ::String, nil
358
+ config_attr :universe_domain, nil, ::String, nil
359
+
360
+ # @private
361
+ def initialize parent_config = nil
362
+ @parent_config = parent_config unless parent_config.nil?
363
+
364
+ yield self if block_given?
365
+ end
366
+
367
+ ##
368
+ # Configurations for individual RPCs
369
+ # @return [Rpcs]
370
+ #
371
+ def rpcs
372
+ @rpcs ||= begin
373
+ parent_rpcs = nil
374
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
375
+ Rpcs.new parent_rpcs
376
+ end
377
+ end
378
+
379
+ ##
380
+ # Configuration RPC class for the AccountIssueService API.
381
+ #
382
+ # Includes fields providing the configuration for each RPC in this service.
383
+ # Each configuration object is of type `Gapic::Config::Method` and includes
384
+ # the following configuration fields:
385
+ #
386
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
387
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
388
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
389
+ # include the following keys:
390
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
391
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
392
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
393
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
394
+ # trigger a retry.
395
+ #
396
+ class Rpcs
397
+ ##
398
+ # RPC-specific configuration for `list_account_issues`
399
+ # @return [::Gapic::Config::Method]
400
+ #
401
+ attr_reader :list_account_issues
402
+
403
+ # @private
404
+ def initialize parent_rpcs = nil
405
+ list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues
406
+ @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config
407
+
408
+ yield self if block_given?
409
+ end
410
+ end
411
+ end
412
+ end
413
+ end
414
+ end
415
+ end
416
+ end
417
+ end
418
+ end
419
+ end
@@ -0,0 +1,130 @@
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/shopping/merchant/accounts/v1beta/accountissue_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Accounts
25
+ module V1beta
26
+ module AccountIssueService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the AccountIssueService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: true,
44
+ raise_faraday_errors: false
45
+ end
46
+
47
+ ##
48
+ # The effective universe domain
49
+ #
50
+ # @return [String]
51
+ #
52
+ def universe_domain
53
+ @client_stub.universe_domain
54
+ end
55
+
56
+ ##
57
+ # The effective endpoint
58
+ #
59
+ # @return [String]
60
+ #
61
+ def endpoint
62
+ @client_stub.endpoint
63
+ end
64
+
65
+ ##
66
+ # Baseline implementation for the list_account_issues REST call
67
+ #
68
+ # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest]
69
+ # A request object representing the call parameters. Required.
70
+ # @param options [::Gapic::CallOptions]
71
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
72
+ #
73
+ # @yield [result, operation] Access the result along with the TransportOperation object
74
+ # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse]
75
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
76
+ #
77
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse]
78
+ # A result object deserialized from the server's reply
79
+ def list_account_issues request_pb, options = nil
80
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
81
+
82
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_account_issues_request request_pb
83
+ query_string_params = if query_string_params.any?
84
+ query_string_params.to_h { |p| p.split "=", 2 }
85
+ else
86
+ {}
87
+ end
88
+
89
+ response = @client_stub.make_http_request(
90
+ verb,
91
+ uri: uri,
92
+ body: body || "",
93
+ params: query_string_params,
94
+ options: options
95
+ )
96
+ operation = ::Gapic::Rest::TransportOperation.new response
97
+ result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.decode_json response.body, ignore_unknown_fields: true
98
+
99
+ yield result, operation if block_given?
100
+ result
101
+ end
102
+
103
+ ##
104
+ # @private
105
+ #
106
+ # GRPC transcoding helper method for the list_account_issues REST call
107
+ #
108
+ # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest]
109
+ # A request object representing the call parameters. Required.
110
+ # @return [Array(String, [String, nil], Hash{String => String})]
111
+ # Uri, Body, Query string parameters
112
+ def self.transcode_list_account_issues_request request_pb
113
+ transcoder = Gapic::Rest::GrpcTranscoder.new
114
+ .with_bindings(
115
+ uri_method: :get,
116
+ uri_template: "/accounts/v1beta/{parent}/issues",
117
+ matches: [
118
+ ["parent", %r{^accounts/[^/]+/?$}, false]
119
+ ]
120
+ )
121
+ transcoder.transcode request_pb
122
+ end
123
+ end
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,54 @@
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 "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/accounts/v1beta/version"
24
+
25
+ require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials"
26
+ require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths"
27
+ require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module Accounts
33
+ module V1beta
34
+ ##
35
+ # Service to support `AccountIssueService` API.
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest"
40
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new
41
+ #
42
+ module AccountIssueService
43
+ # Client for the REST transport
44
+ module Rest
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
54
+ require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,57 @@
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 "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/accounts/v1beta/version"
24
+
25
+ require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials"
26
+ require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths"
27
+ require "google/shopping/merchant/accounts/v1beta/account_issue_service/client"
28
+ require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module Accounts
34
+ module V1beta
35
+ ##
36
+ # Service to support `AccountIssueService` API.
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/shopping/merchant/accounts/v1beta/account_issue_service"
41
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new
42
+ #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest"
46
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new
47
+ #
48
+ module AccountIssueService
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "account_issue_service", "helpers.rb"
57
+ require "google/shopping/merchant/accounts/v1beta/account_issue_service/helpers" if ::File.file? helper_path