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,987 @@
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/accounts_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Accounts
26
+ module V1
27
+ module AccountsService
28
+ ##
29
+ # Client for the AccountsService service.
30
+ #
31
+ # Service to support Accounts API.
32
+ #
33
+ class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
39
+
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :accounts_service_stub
44
+
45
+ ##
46
+ # Configure the AccountsService Client class.
47
+ #
48
+ # See {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all AccountsService clients
54
+ # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.timeout = 60.0
75
+ default_config.retry_policy = {
76
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
77
+ }
78
+
79
+ default_config
80
+ end
81
+ yield @configure if block_given?
82
+ @configure
83
+ end
84
+
85
+ ##
86
+ # Configure the AccountsService Client instance.
87
+ #
88
+ # The configuration is set to the derived mode, meaning that values can be changed,
89
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
90
+ # should be made on {Client.configure}.
91
+ #
92
+ # See {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client::Configuration}
93
+ # for a description of the configuration fields.
94
+ #
95
+ # @yield [config] Configure the Client client.
96
+ # @yieldparam config [Client::Configuration]
97
+ #
98
+ # @return [Client::Configuration]
99
+ #
100
+ def configure
101
+ yield @config if block_given?
102
+ @config
103
+ end
104
+
105
+ ##
106
+ # The effective universe domain
107
+ #
108
+ # @return [String]
109
+ #
110
+ def universe_domain
111
+ @accounts_service_stub.universe_domain
112
+ end
113
+
114
+ ##
115
+ # Create a new AccountsService client object.
116
+ #
117
+ # @example
118
+ #
119
+ # # Create a client using the default configuration
120
+ # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new
121
+ #
122
+ # # Create a client using a custom configuration
123
+ # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config|
124
+ # config.timeout = 10.0
125
+ # end
126
+ #
127
+ # @yield [config] Configure the AccountsService client.
128
+ # @yieldparam config [Client::Configuration]
129
+ #
130
+ def initialize
131
+ # These require statements are intentionally placed here to initialize
132
+ # the gRPC module only when it's required.
133
+ # See https://github.com/googleapis/toolkit/issues/446
134
+ require "gapic/grpc"
135
+ require "google/shopping/merchant/accounts/v1/accounts_services_pb"
136
+
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
+ @quota_project_id = @config.quota_project
156
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
157
+
158
+ @accounts_service_stub = ::Gapic::ServiceStub.new(
159
+ ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Stub,
160
+ credentials: credentials,
161
+ endpoint: @config.endpoint,
162
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
+ universe_domain: @config.universe_domain,
164
+ channel_args: @config.channel_args,
165
+ interceptors: @config.interceptors,
166
+ channel_pool_config: @config.channel_pool,
167
+ logger: @config.logger
168
+ )
169
+
170
+ @accounts_service_stub.stub_logger&.info do |entry|
171
+ entry.set_system_name
172
+ entry.set_service
173
+ entry.message = "Created client for #{entry.service}"
174
+ entry.set_credentials_fields credentials
175
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
176
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
177
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
178
+ end
179
+ end
180
+
181
+ ##
182
+ # The logger used for request/response debug logging.
183
+ #
184
+ # @return [Logger]
185
+ #
186
+ def logger
187
+ @accounts_service_stub.logger
188
+ end
189
+
190
+ # Service calls
191
+
192
+ ##
193
+ # Retrieves an account from your Merchant Center account.
194
+ # After inserting, updating, or deleting an account, it may take several
195
+ # minutes before changes take effect.
196
+ #
197
+ # @overload get_account(request, options = nil)
198
+ # Pass arguments to `get_account` via a request object, either of type
199
+ # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest} or an equivalent Hash.
200
+ #
201
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::Hash]
202
+ # A request object representing the call parameters. Required. To specify no
203
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
204
+ # @param options [::Gapic::CallOptions, ::Hash]
205
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
206
+ #
207
+ # @overload get_account(name: nil)
208
+ # Pass arguments to `get_account` via keyword arguments. Note that at
209
+ # least one keyword argument is required. To specify no parameters, or to keep all
210
+ # the default parameter values, pass an empty Hash as a request object (see above).
211
+ #
212
+ # @param name [::String]
213
+ # Required. The name of the account to retrieve.
214
+ # Format: `accounts/{account}`
215
+ #
216
+ # @yield [response, operation] Access the result along with the RPC operation
217
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account]
218
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
219
+ #
220
+ # @return [::Google::Shopping::Merchant::Accounts::V1::Account]
221
+ #
222
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
223
+ #
224
+ # @example Basic example
225
+ # require "google/shopping/merchant/accounts/v1"
226
+ #
227
+ # # Create a client object. The client can be reused for multiple calls.
228
+ # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new
229
+ #
230
+ # # Create a request. To set request fields, pass in keyword arguments.
231
+ # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new
232
+ #
233
+ # # Call the get_account method.
234
+ # result = client.get_account request
235
+ #
236
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account.
237
+ # p result
238
+ #
239
+ def get_account request, options = nil
240
+ raise ::ArgumentError, "request must be provided" if request.nil?
241
+
242
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest
243
+
244
+ # Converts hash and nil to an options object
245
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
246
+
247
+ # Customize the options with defaults
248
+ metadata = @config.rpcs.get_account.metadata.to_h
249
+
250
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
251
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
252
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
253
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
254
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
255
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
256
+
257
+ header_params = {}
258
+ if request.name
259
+ header_params["name"] = request.name
260
+ end
261
+
262
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
263
+ metadata[:"x-goog-request-params"] ||= request_params_header
264
+
265
+ options.apply_defaults timeout: @config.rpcs.get_account.timeout,
266
+ metadata: metadata,
267
+ retry_policy: @config.rpcs.get_account.retry_policy
268
+
269
+ options.apply_defaults timeout: @config.timeout,
270
+ metadata: @config.metadata,
271
+ retry_policy: @config.retry_policy
272
+
273
+ @accounts_service_stub.call_rpc :get_account, request, options: options do |response, operation|
274
+ yield response, operation if block_given?
275
+ end
276
+ rescue ::GRPC::BadStatus => e
277
+ raise ::Google::Cloud::Error.from_error(e)
278
+ end
279
+
280
+ ##
281
+ # Creates a Merchant Center account with additional configuration. Adds the
282
+ # user that makes the request as an admin for the new account.
283
+ #
284
+ # @overload create_and_configure_account(request, options = nil)
285
+ # Pass arguments to `create_and_configure_account` via a request object, either of type
286
+ # {::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest} or an equivalent Hash.
287
+ #
288
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::Hash]
289
+ # A request object representing the call parameters. Required. To specify no
290
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
291
+ # @param options [::Gapic::CallOptions, ::Hash]
292
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
293
+ #
294
+ # @overload create_and_configure_account(account: nil, user: nil, service: nil)
295
+ # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at
296
+ # least one keyword argument is required. To specify no parameters, or to keep all
297
+ # the default parameter values, pass an empty Hash as a request object (see above).
298
+ #
299
+ # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash]
300
+ # Required. The account to be created.
301
+ # @param user [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, ::Hash>]
302
+ # Optional. Users to be added to the account.
303
+ # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>]
304
+ # Required. An account service between the account to be created and the
305
+ # provider account is initialized as part of the creation. At least one such
306
+ # service needs to be provided. Currently exactly one of these needs to be
307
+ # `account_aggregation` and `accounts.createAndConfigure` method can be
308
+ # used to create a sub-account under an existing advanced account through
309
+ # this method. Additional `account_management` or
310
+ # `product_management` services may be provided.
311
+ #
312
+ # @yield [response, operation] Access the result along with the RPC operation
313
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account]
314
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
315
+ #
316
+ # @return [::Google::Shopping::Merchant::Accounts::V1::Account]
317
+ #
318
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
319
+ #
320
+ # @example Basic example
321
+ # require "google/shopping/merchant/accounts/v1"
322
+ #
323
+ # # Create a client object. The client can be reused for multiple calls.
324
+ # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new
325
+ #
326
+ # # Create a request. To set request fields, pass in keyword arguments.
327
+ # request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new
328
+ #
329
+ # # Call the create_and_configure_account method.
330
+ # result = client.create_and_configure_account request
331
+ #
332
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account.
333
+ # p result
334
+ #
335
+ def create_and_configure_account request, options = nil
336
+ raise ::ArgumentError, "request must be provided" if request.nil?
337
+
338
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest
339
+
340
+ # Converts hash and nil to an options object
341
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
342
+
343
+ # Customize the options with defaults
344
+ metadata = @config.rpcs.create_and_configure_account.metadata.to_h
345
+
346
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
347
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
348
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
349
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
350
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
351
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
352
+
353
+ options.apply_defaults timeout: @config.rpcs.create_and_configure_account.timeout,
354
+ metadata: metadata,
355
+ retry_policy: @config.rpcs.create_and_configure_account.retry_policy
356
+
357
+ options.apply_defaults timeout: @config.timeout,
358
+ metadata: @config.metadata,
359
+ retry_policy: @config.retry_policy
360
+
361
+ @accounts_service_stub.call_rpc :create_and_configure_account, request, options: options do |response, operation|
362
+ yield response, operation if block_given?
363
+ end
364
+ rescue ::GRPC::BadStatus => e
365
+ raise ::Google::Cloud::Error.from_error(e)
366
+ end
367
+
368
+ ##
369
+ # Deletes the specified account regardless of its type: standalone, advanced
370
+ # account or sub-account. Deleting an advanced account leads to the deletion
371
+ # of all of its sub-accounts. Executing this method requires admin access.
372
+ # The deletion succeeds only if the account does not provide services
373
+ # to any other account and has no processed offers. You can use the `force`
374
+ # parameter to override this.
375
+ #
376
+ # @overload delete_account(request, options = nil)
377
+ # Pass arguments to `delete_account` via a request object, either of type
378
+ # {::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest} or an equivalent Hash.
379
+ #
380
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::Hash]
381
+ # A request object representing the call parameters. Required. To specify no
382
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
383
+ # @param options [::Gapic::CallOptions, ::Hash]
384
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
385
+ #
386
+ # @overload delete_account(name: nil, force: nil)
387
+ # Pass arguments to `delete_account` via keyword arguments. Note that at
388
+ # least one keyword argument is required. To specify no parameters, or to keep all
389
+ # the default parameter values, pass an empty Hash as a request object (see above).
390
+ #
391
+ # @param name [::String]
392
+ # Required. The name of the account to delete.
393
+ # Format: `accounts/{account}`
394
+ # @param force [::Boolean]
395
+ # Optional. If set to `true`, the account is deleted even if it provides
396
+ # services to other accounts or has processed offers.
397
+ #
398
+ # @yield [response, operation] Access the result along with the RPC operation
399
+ # @yieldparam response [::Google::Protobuf::Empty]
400
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
401
+ #
402
+ # @return [::Google::Protobuf::Empty]
403
+ #
404
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
405
+ #
406
+ # @example Basic example
407
+ # require "google/shopping/merchant/accounts/v1"
408
+ #
409
+ # # Create a client object. The client can be reused for multiple calls.
410
+ # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new
411
+ #
412
+ # # Create a request. To set request fields, pass in keyword arguments.
413
+ # request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new
414
+ #
415
+ # # Call the delete_account method.
416
+ # result = client.delete_account request
417
+ #
418
+ # # The returned object is of type Google::Protobuf::Empty.
419
+ # p result
420
+ #
421
+ def delete_account request, options = nil
422
+ raise ::ArgumentError, "request must be provided" if request.nil?
423
+
424
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest
425
+
426
+ # Converts hash and nil to an options object
427
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
428
+
429
+ # Customize the options with defaults
430
+ metadata = @config.rpcs.delete_account.metadata.to_h
431
+
432
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
433
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
434
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
435
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
436
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
437
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
438
+
439
+ header_params = {}
440
+ if request.name
441
+ header_params["name"] = request.name
442
+ end
443
+
444
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
445
+ metadata[:"x-goog-request-params"] ||= request_params_header
446
+
447
+ options.apply_defaults timeout: @config.rpcs.delete_account.timeout,
448
+ metadata: metadata,
449
+ retry_policy: @config.rpcs.delete_account.retry_policy
450
+
451
+ options.apply_defaults timeout: @config.timeout,
452
+ metadata: @config.metadata,
453
+ retry_policy: @config.retry_policy
454
+
455
+ @accounts_service_stub.call_rpc :delete_account, request, options: options do |response, operation|
456
+ yield response, operation if block_given?
457
+ end
458
+ rescue ::GRPC::BadStatus => e
459
+ raise ::Google::Cloud::Error.from_error(e)
460
+ end
461
+
462
+ ##
463
+ # Updates an account regardless of its type: standalone, advanced account or
464
+ # sub-account. Executing this method requires admin access.
465
+ #
466
+ # @overload update_account(request, options = nil)
467
+ # Pass arguments to `update_account` via a request object, either of type
468
+ # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest} or an equivalent Hash.
469
+ #
470
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::Hash]
471
+ # A request object representing the call parameters. Required. To specify no
472
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
473
+ # @param options [::Gapic::CallOptions, ::Hash]
474
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
475
+ #
476
+ # @overload update_account(account: nil, update_mask: nil)
477
+ # Pass arguments to `update_account` via keyword arguments. Note that at
478
+ # least one keyword argument is required. To specify no parameters, or to keep all
479
+ # the default parameter values, pass an empty Hash as a request object (see above).
480
+ #
481
+ # @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash]
482
+ # Required. The new version of the account.
483
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
484
+ # Optional. List of fields being updated.
485
+ #
486
+ # The following fields are supported (in both `snake_case` and
487
+ # `lowerCamelCase`):
488
+ #
489
+ # - `account_name`
490
+ # - `adult_content`
491
+ # - `language_code`
492
+ # - `time_zone`
493
+ #
494
+ # @yield [response, operation] Access the result along with the RPC operation
495
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account]
496
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
497
+ #
498
+ # @return [::Google::Shopping::Merchant::Accounts::V1::Account]
499
+ #
500
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
501
+ #
502
+ # @example Basic example
503
+ # require "google/shopping/merchant/accounts/v1"
504
+ #
505
+ # # Create a client object. The client can be reused for multiple calls.
506
+ # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new
507
+ #
508
+ # # Create a request. To set request fields, pass in keyword arguments.
509
+ # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new
510
+ #
511
+ # # Call the update_account method.
512
+ # result = client.update_account request
513
+ #
514
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account.
515
+ # p result
516
+ #
517
+ def update_account request, options = nil
518
+ raise ::ArgumentError, "request must be provided" if request.nil?
519
+
520
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest
521
+
522
+ # Converts hash and nil to an options object
523
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
524
+
525
+ # Customize the options with defaults
526
+ metadata = @config.rpcs.update_account.metadata.to_h
527
+
528
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
529
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
530
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
531
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
532
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
533
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
534
+
535
+ header_params = {}
536
+ if request.account&.name
537
+ header_params["account.name"] = request.account.name
538
+ end
539
+
540
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
541
+ metadata[:"x-goog-request-params"] ||= request_params_header
542
+
543
+ options.apply_defaults timeout: @config.rpcs.update_account.timeout,
544
+ metadata: metadata,
545
+ retry_policy: @config.rpcs.update_account.retry_policy
546
+
547
+ options.apply_defaults timeout: @config.timeout,
548
+ metadata: @config.metadata,
549
+ retry_policy: @config.retry_policy
550
+
551
+ @accounts_service_stub.call_rpc :update_account, request, options: options do |response, operation|
552
+ yield response, operation if block_given?
553
+ end
554
+ rescue ::GRPC::BadStatus => e
555
+ raise ::Google::Cloud::Error.from_error(e)
556
+ end
557
+
558
+ ##
559
+ # Note: For the `accounts.list` method, quota and limits usage are charged
560
+ # for each user, and not for the Merchant Center ID or the advanced account
561
+ # ID. To list several sub-accounts, you should use the
562
+ # `accounts.listSubaccounts` method, which is more suitable for advanced
563
+ # accounts use case.
564
+ #
565
+ # @overload list_accounts(request, options = nil)
566
+ # Pass arguments to `list_accounts` via a request object, either of type
567
+ # {::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest} or an equivalent Hash.
568
+ #
569
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::Hash]
570
+ # A request object representing the call parameters. Required. To specify no
571
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
572
+ # @param options [::Gapic::CallOptions, ::Hash]
573
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
574
+ #
575
+ # @overload list_accounts(page_size: nil, page_token: nil, filter: nil)
576
+ # Pass arguments to `list_accounts` via keyword arguments. Note that at
577
+ # least one keyword argument is required. To specify no parameters, or to keep all
578
+ # the default parameter values, pass an empty Hash as a request object (see above).
579
+ #
580
+ # @param page_size [::Integer]
581
+ # Optional. The maximum number of accounts to return. The service may return
582
+ # fewer than this value. If unspecified, at most 250 accounts are returned.
583
+ # The maximum value is 500; values above 500 are coerced to 500.
584
+ # @param page_token [::String]
585
+ # Optional. A page token, received from a previous `accounts.list` call.
586
+ # Provide this to retrieve the subsequent page.
587
+ #
588
+ # When paginating, all other parameters provided in the `accounts.list`
589
+ # request must match the call that provided the page token.
590
+ # @param filter [::String]
591
+ # Optional. Returns only accounts that match the
592
+ # [filter](https://developers.google.com/merchant/api/guides/accounts/filter).
593
+ # For more details, see the
594
+ # [filter syntax
595
+ # reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax).
596
+ #
597
+ # @yield [response, operation] Access the result along with the RPC operation
598
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>]
599
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
600
+ #
601
+ # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>]
602
+ #
603
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
604
+ #
605
+ # @example Basic example
606
+ # require "google/shopping/merchant/accounts/v1"
607
+ #
608
+ # # Create a client object. The client can be reused for multiple calls.
609
+ # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new
610
+ #
611
+ # # Create a request. To set request fields, pass in keyword arguments.
612
+ # request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new
613
+ #
614
+ # # Call the list_accounts method.
615
+ # result = client.list_accounts request
616
+ #
617
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
618
+ # # over elements, and API calls will be issued to fetch pages as needed.
619
+ # result.each do |item|
620
+ # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account.
621
+ # p item
622
+ # end
623
+ #
624
+ def list_accounts request, options = nil
625
+ raise ::ArgumentError, "request must be provided" if request.nil?
626
+
627
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest
628
+
629
+ # Converts hash and nil to an options object
630
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
631
+
632
+ # Customize the options with defaults
633
+ metadata = @config.rpcs.list_accounts.metadata.to_h
634
+
635
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
636
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
637
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
638
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
639
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
640
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
641
+
642
+ options.apply_defaults timeout: @config.rpcs.list_accounts.timeout,
643
+ metadata: metadata,
644
+ retry_policy: @config.rpcs.list_accounts.retry_policy
645
+
646
+ options.apply_defaults timeout: @config.timeout,
647
+ metadata: @config.metadata,
648
+ retry_policy: @config.retry_policy
649
+
650
+ @accounts_service_stub.call_rpc :list_accounts, request, options: options do |response, operation|
651
+ response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_accounts, request, response, operation, options
652
+ yield response, operation if block_given?
653
+ throw :response, response
654
+ end
655
+ rescue ::GRPC::BadStatus => e
656
+ raise ::Google::Cloud::Error.from_error(e)
657
+ end
658
+
659
+ ##
660
+ # List all sub-accounts for a given advanced account. This is a
661
+ # convenience wrapper for the more powerful `accounts.list` method. This
662
+ # method will produce the same results as calling `ListsAccounts` with the
663
+ # following filter:
664
+ # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))`
665
+ #
666
+ # @overload list_sub_accounts(request, options = nil)
667
+ # Pass arguments to `list_sub_accounts` via a request object, either of type
668
+ # {::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest} or an equivalent Hash.
669
+ #
670
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::Hash]
671
+ # A request object representing the call parameters. Required. To specify no
672
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
673
+ # @param options [::Gapic::CallOptions, ::Hash]
674
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
675
+ #
676
+ # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil)
677
+ # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at
678
+ # least one keyword argument is required. To specify no parameters, or to keep all
679
+ # the default parameter values, pass an empty Hash as a request object (see above).
680
+ #
681
+ # @param provider [::String]
682
+ # Required. The aggregation service provider.
683
+ # Format: `accounts/{accountId}`
684
+ # @param page_size [::Integer]
685
+ # Optional. The maximum number of accounts to return. The service may return
686
+ # fewer than this value. If unspecified, at most 250 accounts are returned.
687
+ # The maximum value is 500; values above 500 are coerced to 500.
688
+ # @param page_token [::String]
689
+ # Optional. A page token, received from a previous `accounts.list` call.
690
+ # Provide this to retrieve the subsequent page.
691
+ #
692
+ # When paginating, all other parameters provided in the `accounts.list`
693
+ # request must match the call that provided the page token.
694
+ #
695
+ # @yield [response, operation] Access the result along with the RPC operation
696
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>]
697
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
698
+ #
699
+ # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>]
700
+ #
701
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
702
+ #
703
+ # @example Basic example
704
+ # require "google/shopping/merchant/accounts/v1"
705
+ #
706
+ # # Create a client object. The client can be reused for multiple calls.
707
+ # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new
708
+ #
709
+ # # Create a request. To set request fields, pass in keyword arguments.
710
+ # request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new
711
+ #
712
+ # # Call the list_sub_accounts method.
713
+ # result = client.list_sub_accounts request
714
+ #
715
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
716
+ # # over elements, and API calls will be issued to fetch pages as needed.
717
+ # result.each do |item|
718
+ # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account.
719
+ # p item
720
+ # end
721
+ #
722
+ def list_sub_accounts request, options = nil
723
+ raise ::ArgumentError, "request must be provided" if request.nil?
724
+
725
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest
726
+
727
+ # Converts hash and nil to an options object
728
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
729
+
730
+ # Customize the options with defaults
731
+ metadata = @config.rpcs.list_sub_accounts.metadata.to_h
732
+
733
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
734
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
735
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
736
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
737
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
738
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
739
+
740
+ header_params = {}
741
+ if request.provider
742
+ header_params["provider"] = request.provider
743
+ end
744
+
745
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
746
+ metadata[:"x-goog-request-params"] ||= request_params_header
747
+
748
+ options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout,
749
+ metadata: metadata,
750
+ retry_policy: @config.rpcs.list_sub_accounts.retry_policy
751
+
752
+ options.apply_defaults timeout: @config.timeout,
753
+ metadata: @config.metadata,
754
+ retry_policy: @config.retry_policy
755
+
756
+ @accounts_service_stub.call_rpc :list_sub_accounts, request, options: options do |response, operation|
757
+ response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, request, response, operation, options
758
+ yield response, operation if block_given?
759
+ throw :response, response
760
+ end
761
+ rescue ::GRPC::BadStatus => e
762
+ raise ::Google::Cloud::Error.from_error(e)
763
+ end
764
+
765
+ ##
766
+ # Configuration class for the AccountsService API.
767
+ #
768
+ # This class represents the configuration for AccountsService,
769
+ # providing control over timeouts, retry behavior, logging, transport
770
+ # parameters, and other low-level controls. Certain parameters can also be
771
+ # applied individually to specific RPCs. See
772
+ # {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client::Configuration::Rpcs}
773
+ # for a list of RPCs that can be configured independently.
774
+ #
775
+ # Configuration can be applied globally to all clients, or to a single client
776
+ # on construction.
777
+ #
778
+ # @example
779
+ #
780
+ # # Modify the global config, setting the timeout for
781
+ # # get_account to 20 seconds,
782
+ # # and all remaining timeouts to 10 seconds.
783
+ # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.configure do |config|
784
+ # config.timeout = 10.0
785
+ # config.rpcs.get_account.timeout = 20.0
786
+ # end
787
+ #
788
+ # # Apply the above configuration only to a new client.
789
+ # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config|
790
+ # config.timeout = 10.0
791
+ # config.rpcs.get_account.timeout = 20.0
792
+ # end
793
+ #
794
+ # @!attribute [rw] endpoint
795
+ # A custom service endpoint, as a hostname or hostname:port. The default is
796
+ # nil, indicating to use the default endpoint in the current universe domain.
797
+ # @return [::String,nil]
798
+ # @!attribute [rw] credentials
799
+ # Credentials to send with calls. You may provide any of the following types:
800
+ # * (`String`) The path to a service account key file in JSON format
801
+ # * (`Hash`) A service account key as a Hash
802
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
803
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
804
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
805
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
806
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
807
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
808
+ # * (`nil`) indicating no credentials
809
+ #
810
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
811
+ # external source for authentication to Google Cloud, you must validate it before
812
+ # providing it to a Google API client library. Providing an unvalidated credential
813
+ # configuration to Google APIs can compromise the security of your systems and data.
814
+ # For more information, refer to [Validate credential configurations from external
815
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
816
+ # @return [::Object]
817
+ # @!attribute [rw] scope
818
+ # The OAuth scopes
819
+ # @return [::Array<::String>]
820
+ # @!attribute [rw] lib_name
821
+ # The library name as recorded in instrumentation and logging
822
+ # @return [::String]
823
+ # @!attribute [rw] lib_version
824
+ # The library version as recorded in instrumentation and logging
825
+ # @return [::String]
826
+ # @!attribute [rw] channel_args
827
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
828
+ # `GRPC::Core::Channel` object is provided as the credential.
829
+ # @return [::Hash]
830
+ # @!attribute [rw] interceptors
831
+ # An array of interceptors that are run before calls are executed.
832
+ # @return [::Array<::GRPC::ClientInterceptor>]
833
+ # @!attribute [rw] timeout
834
+ # The call timeout in seconds.
835
+ # @return [::Numeric]
836
+ # @!attribute [rw] metadata
837
+ # Additional gRPC headers to be sent with the call.
838
+ # @return [::Hash{::Symbol=>::String}]
839
+ # @!attribute [rw] retry_policy
840
+ # The retry policy. The value is a hash with the following keys:
841
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
842
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
843
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
844
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
845
+ # trigger a retry.
846
+ # @return [::Hash]
847
+ # @!attribute [rw] quota_project
848
+ # A separate project against which to charge quota.
849
+ # @return [::String]
850
+ # @!attribute [rw] universe_domain
851
+ # The universe domain within which to make requests. This determines the
852
+ # default endpoint URL. The default value of nil uses the environment
853
+ # universe (usually the default "googleapis.com" universe).
854
+ # @return [::String,nil]
855
+ # @!attribute [rw] logger
856
+ # A custom logger to use for request/response debug logging, or the value
857
+ # `:default` (the default) to construct a default logger, or `nil` to
858
+ # explicitly disable logging.
859
+ # @return [::Logger,:default,nil]
860
+ #
861
+ class Configuration
862
+ extend ::Gapic::Config
863
+
864
+ # @private
865
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
866
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
867
+
868
+ config_attr :endpoint, nil, ::String, nil
869
+ config_attr :credentials, nil do |value|
870
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
871
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
872
+ allowed.any? { |klass| klass === value }
873
+ end
874
+ config_attr :scope, nil, ::String, ::Array, nil
875
+ config_attr :lib_name, nil, ::String, nil
876
+ config_attr :lib_version, nil, ::String, nil
877
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
878
+ config_attr :interceptors, nil, ::Array, nil
879
+ config_attr :timeout, nil, ::Numeric, nil
880
+ config_attr :metadata, nil, ::Hash, nil
881
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
882
+ config_attr :quota_project, nil, ::String, nil
883
+ config_attr :universe_domain, nil, ::String, nil
884
+ config_attr :logger, :default, ::Logger, nil, :default
885
+
886
+ # @private
887
+ def initialize parent_config = nil
888
+ @parent_config = parent_config unless parent_config.nil?
889
+
890
+ yield self if block_given?
891
+ end
892
+
893
+ ##
894
+ # Configurations for individual RPCs
895
+ # @return [Rpcs]
896
+ #
897
+ def rpcs
898
+ @rpcs ||= begin
899
+ parent_rpcs = nil
900
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
901
+ Rpcs.new parent_rpcs
902
+ end
903
+ end
904
+
905
+ ##
906
+ # Configuration for the channel pool
907
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
908
+ #
909
+ def channel_pool
910
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
911
+ end
912
+
913
+ ##
914
+ # Configuration RPC class for the AccountsService API.
915
+ #
916
+ # Includes fields providing the configuration for each RPC in this service.
917
+ # Each configuration object is of type `Gapic::Config::Method` and includes
918
+ # the following configuration fields:
919
+ #
920
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
921
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
922
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
923
+ # include the following keys:
924
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
925
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
926
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
927
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
928
+ # trigger a retry.
929
+ #
930
+ class Rpcs
931
+ ##
932
+ # RPC-specific configuration for `get_account`
933
+ # @return [::Gapic::Config::Method]
934
+ #
935
+ attr_reader :get_account
936
+ ##
937
+ # RPC-specific configuration for `create_and_configure_account`
938
+ # @return [::Gapic::Config::Method]
939
+ #
940
+ attr_reader :create_and_configure_account
941
+ ##
942
+ # RPC-specific configuration for `delete_account`
943
+ # @return [::Gapic::Config::Method]
944
+ #
945
+ attr_reader :delete_account
946
+ ##
947
+ # RPC-specific configuration for `update_account`
948
+ # @return [::Gapic::Config::Method]
949
+ #
950
+ attr_reader :update_account
951
+ ##
952
+ # RPC-specific configuration for `list_accounts`
953
+ # @return [::Gapic::Config::Method]
954
+ #
955
+ attr_reader :list_accounts
956
+ ##
957
+ # RPC-specific configuration for `list_sub_accounts`
958
+ # @return [::Gapic::Config::Method]
959
+ #
960
+ attr_reader :list_sub_accounts
961
+
962
+ # @private
963
+ def initialize parent_rpcs = nil
964
+ get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account
965
+ @get_account = ::Gapic::Config::Method.new get_account_config
966
+ create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account
967
+ @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config
968
+ delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account
969
+ @delete_account = ::Gapic::Config::Method.new delete_account_config
970
+ update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account
971
+ @update_account = ::Gapic::Config::Method.new update_account_config
972
+ list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts
973
+ @list_accounts = ::Gapic::Config::Method.new list_accounts_config
974
+ list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts
975
+ @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config
976
+
977
+ yield self if block_given?
978
+ end
979
+ end
980
+ end
981
+ end
982
+ end
983
+ end
984
+ end
985
+ end
986
+ end
987
+ end