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