google-shopping-merchant-accounts-v1 0.a → 0.1.1

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,770 @@
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/programs_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Accounts
26
+ module V1
27
+ module ProgramsService
28
+ ##
29
+ # Client for the ProgramsService service.
30
+ #
31
+ # Service for program management.
32
+ #
33
+ # Programs provide a mechanism for adding functionality to merchant accounts. A
34
+ # typical example of this is the [Free product
35
+ # listings](https://support.google.com/merchants/answer/13889434)
36
+ # program, which enables products from a merchant's store to be shown across
37
+ # Google for free.
38
+ #
39
+ # This service exposes methods to retrieve a business's
40
+ # participation in all available programs, in addition to methods for
41
+ # explicitly enabling or disabling participation in each program.
42
+ #
43
+ class Client
44
+ # @private
45
+ API_VERSION = ""
46
+
47
+ # @private
48
+ DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
49
+
50
+ include Paths
51
+
52
+ # @private
53
+ attr_reader :programs_service_stub
54
+
55
+ ##
56
+ # Configure the ProgramsService Client class.
57
+ #
58
+ # See {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client::Configuration}
59
+ # for a description of the configuration fields.
60
+ #
61
+ # @example
62
+ #
63
+ # # Modify the configuration for all ProgramsService clients
64
+ # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.configure do |config|
65
+ # config.timeout = 10.0
66
+ # end
67
+ #
68
+ # @yield [config] Configure the Client client.
69
+ # @yieldparam config [Client::Configuration]
70
+ #
71
+ # @return [Client::Configuration]
72
+ #
73
+ def self.configure
74
+ @configure ||= begin
75
+ namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1"]
76
+ parent_config = while namespace.any?
77
+ parent_name = namespace.join "::"
78
+ parent_const = const_get parent_name
79
+ break parent_const.configure if parent_const.respond_to? :configure
80
+ namespace.pop
81
+ end
82
+ default_config = Client::Configuration.new parent_config
83
+
84
+ default_config.timeout = 60.0
85
+ default_config.retry_policy = {
86
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
87
+ }
88
+
89
+ default_config
90
+ end
91
+ yield @configure if block_given?
92
+ @configure
93
+ end
94
+
95
+ ##
96
+ # Configure the ProgramsService Client instance.
97
+ #
98
+ # The configuration is set to the derived mode, meaning that values can be changed,
99
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
100
+ # should be made on {Client.configure}.
101
+ #
102
+ # See {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client::Configuration}
103
+ # for a description of the configuration fields.
104
+ #
105
+ # @yield [config] Configure the Client client.
106
+ # @yieldparam config [Client::Configuration]
107
+ #
108
+ # @return [Client::Configuration]
109
+ #
110
+ def configure
111
+ yield @config if block_given?
112
+ @config
113
+ end
114
+
115
+ ##
116
+ # The effective universe domain
117
+ #
118
+ # @return [String]
119
+ #
120
+ def universe_domain
121
+ @programs_service_stub.universe_domain
122
+ end
123
+
124
+ ##
125
+ # Create a new ProgramsService client object.
126
+ #
127
+ # @example
128
+ #
129
+ # # Create a client using the default configuration
130
+ # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new
131
+ #
132
+ # # Create a client using a custom configuration
133
+ # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config|
134
+ # config.timeout = 10.0
135
+ # end
136
+ #
137
+ # @yield [config] Configure the ProgramsService client.
138
+ # @yieldparam config [Client::Configuration]
139
+ #
140
+ def initialize
141
+ # These require statements are intentionally placed here to initialize
142
+ # the gRPC module only when it's required.
143
+ # See https://github.com/googleapis/toolkit/issues/446
144
+ require "gapic/grpc"
145
+ require "google/shopping/merchant/accounts/v1/programs_services_pb"
146
+
147
+ # Create the configuration object
148
+ @config = Configuration.new Client.configure
149
+
150
+ # Yield the configuration if needed
151
+ yield @config if block_given?
152
+
153
+ # Create credentials
154
+ credentials = @config.credentials
155
+ # Use self-signed JWT if the endpoint is unchanged from default,
156
+ # but only if the default endpoint does not have a region prefix.
157
+ enable_self_signed_jwt = @config.endpoint.nil? ||
158
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
159
+ !@config.endpoint.split(".").first.include?("-"))
160
+ credentials ||= Credentials.default scope: @config.scope,
161
+ enable_self_signed_jwt: enable_self_signed_jwt
162
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
163
+ credentials = Credentials.new credentials, scope: @config.scope
164
+ end
165
+ @quota_project_id = @config.quota_project
166
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
167
+
168
+ @programs_service_stub = ::Gapic::ServiceStub.new(
169
+ ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Stub,
170
+ credentials: credentials,
171
+ endpoint: @config.endpoint,
172
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
173
+ universe_domain: @config.universe_domain,
174
+ channel_args: @config.channel_args,
175
+ interceptors: @config.interceptors,
176
+ channel_pool_config: @config.channel_pool,
177
+ logger: @config.logger
178
+ )
179
+
180
+ @programs_service_stub.stub_logger&.info do |entry|
181
+ entry.set_system_name
182
+ entry.set_service
183
+ entry.message = "Created client for #{entry.service}"
184
+ entry.set_credentials_fields credentials
185
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
186
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
187
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
188
+ end
189
+ end
190
+
191
+ ##
192
+ # The logger used for request/response debug logging.
193
+ #
194
+ # @return [Logger]
195
+ #
196
+ def logger
197
+ @programs_service_stub.logger
198
+ end
199
+
200
+ # Service calls
201
+
202
+ ##
203
+ # Retrieves the specified program for the account.
204
+ #
205
+ # @overload get_program(request, options = nil)
206
+ # Pass arguments to `get_program` via a request object, either of type
207
+ # {::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest} or an equivalent Hash.
208
+ #
209
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::Hash]
210
+ # A request object representing the call parameters. Required. To specify no
211
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
212
+ # @param options [::Gapic::CallOptions, ::Hash]
213
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
214
+ #
215
+ # @overload get_program(name: nil)
216
+ # Pass arguments to `get_program` via keyword arguments. Note that at
217
+ # least one keyword argument is required. To specify no parameters, or to keep all
218
+ # the default parameter values, pass an empty Hash as a request object (see above).
219
+ #
220
+ # @param name [::String]
221
+ # Required. The name of the program to retrieve.
222
+ # Format: `accounts/{account}/programs/{program}`. For example,
223
+ # `accounts/123456/programs/free-listings`.
224
+ #
225
+ # @yield [response, operation] Access the result along with the RPC operation
226
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program]
227
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
228
+ #
229
+ # @return [::Google::Shopping::Merchant::Accounts::V1::Program]
230
+ #
231
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
232
+ #
233
+ # @example Basic example
234
+ # require "google/shopping/merchant/accounts/v1"
235
+ #
236
+ # # Create a client object. The client can be reused for multiple calls.
237
+ # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new
238
+ #
239
+ # # Create a request. To set request fields, pass in keyword arguments.
240
+ # request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new
241
+ #
242
+ # # Call the get_program method.
243
+ # result = client.get_program request
244
+ #
245
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program.
246
+ # p result
247
+ #
248
+ def get_program request, options = nil
249
+ raise ::ArgumentError, "request must be provided" if request.nil?
250
+
251
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest
252
+
253
+ # Converts hash and nil to an options object
254
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
255
+
256
+ # Customize the options with defaults
257
+ metadata = @config.rpcs.get_program.metadata.to_h
258
+
259
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
260
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
261
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
262
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
263
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
264
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
265
+
266
+ header_params = {}
267
+ if request.name
268
+ header_params["name"] = request.name
269
+ end
270
+
271
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
272
+ metadata[:"x-goog-request-params"] ||= request_params_header
273
+
274
+ options.apply_defaults timeout: @config.rpcs.get_program.timeout,
275
+ metadata: metadata,
276
+ retry_policy: @config.rpcs.get_program.retry_policy
277
+
278
+ options.apply_defaults timeout: @config.timeout,
279
+ metadata: @config.metadata,
280
+ retry_policy: @config.retry_policy
281
+
282
+ @programs_service_stub.call_rpc :get_program, request, options: options do |response, operation|
283
+ yield response, operation if block_given?
284
+ end
285
+ rescue ::GRPC::BadStatus => e
286
+ raise ::Google::Cloud::Error.from_error(e)
287
+ end
288
+
289
+ ##
290
+ # Retrieves all programs for the account.
291
+ #
292
+ # @overload list_programs(request, options = nil)
293
+ # Pass arguments to `list_programs` via a request object, either of type
294
+ # {::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest} or an equivalent Hash.
295
+ #
296
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::Hash]
297
+ # A request object representing the call parameters. Required. To specify no
298
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
299
+ # @param options [::Gapic::CallOptions, ::Hash]
300
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
301
+ #
302
+ # @overload list_programs(parent: nil, page_size: nil, page_token: nil)
303
+ # Pass arguments to `list_programs` via keyword arguments. Note that at
304
+ # least one keyword argument is required. To specify no parameters, or to keep all
305
+ # the default parameter values, pass an empty Hash as a request object (see above).
306
+ #
307
+ # @param parent [::String]
308
+ # Required. The name of the account for which to retrieve all programs.
309
+ # Format: `accounts/{account}`
310
+ # @param page_size [::Integer]
311
+ # Optional. The maximum number of programs to return in a single response. If
312
+ # unspecified (or 0), a default size of 1000 is used. The maximum value is
313
+ # 1000; values above 1000 will be coerced to 1000.
314
+ # @param page_token [::String]
315
+ # Optional. A continuation token, received from a previous `ListPrograms`
316
+ # call. Provide this to retrieve the next page.
317
+ #
318
+ # @yield [response, operation] Access the result along with the RPC operation
319
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>]
320
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
321
+ #
322
+ # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>]
323
+ #
324
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
325
+ #
326
+ # @example Basic example
327
+ # require "google/shopping/merchant/accounts/v1"
328
+ #
329
+ # # Create a client object. The client can be reused for multiple calls.
330
+ # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new
331
+ #
332
+ # # Create a request. To set request fields, pass in keyword arguments.
333
+ # request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new
334
+ #
335
+ # # Call the list_programs method.
336
+ # result = client.list_programs request
337
+ #
338
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
339
+ # # over elements, and API calls will be issued to fetch pages as needed.
340
+ # result.each do |item|
341
+ # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Program.
342
+ # p item
343
+ # end
344
+ #
345
+ def list_programs request, options = nil
346
+ raise ::ArgumentError, "request must be provided" if request.nil?
347
+
348
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest
349
+
350
+ # Converts hash and nil to an options object
351
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
352
+
353
+ # Customize the options with defaults
354
+ metadata = @config.rpcs.list_programs.metadata.to_h
355
+
356
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
357
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
358
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
359
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
360
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
361
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
362
+
363
+ header_params = {}
364
+ if request.parent
365
+ header_params["parent"] = request.parent
366
+ end
367
+
368
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
369
+ metadata[:"x-goog-request-params"] ||= request_params_header
370
+
371
+ options.apply_defaults timeout: @config.rpcs.list_programs.timeout,
372
+ metadata: metadata,
373
+ retry_policy: @config.rpcs.list_programs.retry_policy
374
+
375
+ options.apply_defaults timeout: @config.timeout,
376
+ metadata: @config.metadata,
377
+ retry_policy: @config.retry_policy
378
+
379
+ @programs_service_stub.call_rpc :list_programs, request, options: options do |response, operation|
380
+ response = ::Gapic::PagedEnumerable.new @programs_service_stub, :list_programs, request, response, operation, options
381
+ yield response, operation if block_given?
382
+ throw :response, response
383
+ end
384
+ rescue ::GRPC::BadStatus => e
385
+ raise ::Google::Cloud::Error.from_error(e)
386
+ end
387
+
388
+ ##
389
+ # Enable participation in the specified program for the account.
390
+ #
391
+ # @overload enable_program(request, options = nil)
392
+ # Pass arguments to `enable_program` via a request object, either of type
393
+ # {::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest} or an equivalent Hash.
394
+ #
395
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::Hash]
396
+ # A request object representing the call parameters. Required. To specify no
397
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
398
+ # @param options [::Gapic::CallOptions, ::Hash]
399
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
400
+ #
401
+ # @overload enable_program(name: nil)
402
+ # Pass arguments to `enable_program` via keyword arguments. Note that at
403
+ # least one keyword argument is required. To specify no parameters, or to keep all
404
+ # the default parameter values, pass an empty Hash as a request object (see above).
405
+ #
406
+ # @param name [::String]
407
+ # Required. The name of the program for which to enable participation for the
408
+ # given account. Format: `accounts/{account}/programs/{program}`. For
409
+ # example, `accounts/123456/programs/free-listings`.
410
+ #
411
+ # @yield [response, operation] Access the result along with the RPC operation
412
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program]
413
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
414
+ #
415
+ # @return [::Google::Shopping::Merchant::Accounts::V1::Program]
416
+ #
417
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
418
+ #
419
+ # @example Basic example
420
+ # require "google/shopping/merchant/accounts/v1"
421
+ #
422
+ # # Create a client object. The client can be reused for multiple calls.
423
+ # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new
424
+ #
425
+ # # Create a request. To set request fields, pass in keyword arguments.
426
+ # request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new
427
+ #
428
+ # # Call the enable_program method.
429
+ # result = client.enable_program request
430
+ #
431
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program.
432
+ # p result
433
+ #
434
+ def enable_program request, options = nil
435
+ raise ::ArgumentError, "request must be provided" if request.nil?
436
+
437
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest
438
+
439
+ # Converts hash and nil to an options object
440
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
441
+
442
+ # Customize the options with defaults
443
+ metadata = @config.rpcs.enable_program.metadata.to_h
444
+
445
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
446
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
447
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
448
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
449
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
450
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
451
+
452
+ header_params = {}
453
+ if request.name
454
+ header_params["name"] = request.name
455
+ end
456
+
457
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
458
+ metadata[:"x-goog-request-params"] ||= request_params_header
459
+
460
+ options.apply_defaults timeout: @config.rpcs.enable_program.timeout,
461
+ metadata: metadata,
462
+ retry_policy: @config.rpcs.enable_program.retry_policy
463
+
464
+ options.apply_defaults timeout: @config.timeout,
465
+ metadata: @config.metadata,
466
+ retry_policy: @config.retry_policy
467
+
468
+ @programs_service_stub.call_rpc :enable_program, request, options: options do |response, operation|
469
+ yield response, operation if block_given?
470
+ end
471
+ rescue ::GRPC::BadStatus => e
472
+ raise ::Google::Cloud::Error.from_error(e)
473
+ end
474
+
475
+ ##
476
+ # Disable participation in the specified program for the account.
477
+ #
478
+ # @overload disable_program(request, options = nil)
479
+ # Pass arguments to `disable_program` via a request object, either of type
480
+ # {::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest} or an equivalent Hash.
481
+ #
482
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::Hash]
483
+ # A request object representing the call parameters. Required. To specify no
484
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
485
+ # @param options [::Gapic::CallOptions, ::Hash]
486
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
487
+ #
488
+ # @overload disable_program(name: nil)
489
+ # Pass arguments to `disable_program` via keyword arguments. Note that at
490
+ # least one keyword argument is required. To specify no parameters, or to keep all
491
+ # the default parameter values, pass an empty Hash as a request object (see above).
492
+ #
493
+ # @param name [::String]
494
+ # Required. The name of the program for which to disable participation for
495
+ # the given account. Format: `accounts/{account}/programs/{program}`. For
496
+ # example, `accounts/123456/programs/free-listings`.
497
+ #
498
+ # @yield [response, operation] Access the result along with the RPC operation
499
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program]
500
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
501
+ #
502
+ # @return [::Google::Shopping::Merchant::Accounts::V1::Program]
503
+ #
504
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
505
+ #
506
+ # @example Basic example
507
+ # require "google/shopping/merchant/accounts/v1"
508
+ #
509
+ # # Create a client object. The client can be reused for multiple calls.
510
+ # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new
511
+ #
512
+ # # Create a request. To set request fields, pass in keyword arguments.
513
+ # request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new
514
+ #
515
+ # # Call the disable_program method.
516
+ # result = client.disable_program request
517
+ #
518
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program.
519
+ # p result
520
+ #
521
+ def disable_program request, options = nil
522
+ raise ::ArgumentError, "request must be provided" if request.nil?
523
+
524
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest
525
+
526
+ # Converts hash and nil to an options object
527
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
528
+
529
+ # Customize the options with defaults
530
+ metadata = @config.rpcs.disable_program.metadata.to_h
531
+
532
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
533
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
534
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
535
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
536
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
537
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
538
+
539
+ header_params = {}
540
+ if request.name
541
+ header_params["name"] = request.name
542
+ end
543
+
544
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
545
+ metadata[:"x-goog-request-params"] ||= request_params_header
546
+
547
+ options.apply_defaults timeout: @config.rpcs.disable_program.timeout,
548
+ metadata: metadata,
549
+ retry_policy: @config.rpcs.disable_program.retry_policy
550
+
551
+ options.apply_defaults timeout: @config.timeout,
552
+ metadata: @config.metadata,
553
+ retry_policy: @config.retry_policy
554
+
555
+ @programs_service_stub.call_rpc :disable_program, request, options: options do |response, operation|
556
+ yield response, operation if block_given?
557
+ end
558
+ rescue ::GRPC::BadStatus => e
559
+ raise ::Google::Cloud::Error.from_error(e)
560
+ end
561
+
562
+ ##
563
+ # Configuration class for the ProgramsService API.
564
+ #
565
+ # This class represents the configuration for ProgramsService,
566
+ # providing control over timeouts, retry behavior, logging, transport
567
+ # parameters, and other low-level controls. Certain parameters can also be
568
+ # applied individually to specific RPCs. See
569
+ # {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client::Configuration::Rpcs}
570
+ # for a list of RPCs that can be configured independently.
571
+ #
572
+ # Configuration can be applied globally to all clients, or to a single client
573
+ # on construction.
574
+ #
575
+ # @example
576
+ #
577
+ # # Modify the global config, setting the timeout for
578
+ # # get_program to 20 seconds,
579
+ # # and all remaining timeouts to 10 seconds.
580
+ # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.configure do |config|
581
+ # config.timeout = 10.0
582
+ # config.rpcs.get_program.timeout = 20.0
583
+ # end
584
+ #
585
+ # # Apply the above configuration only to a new client.
586
+ # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config|
587
+ # config.timeout = 10.0
588
+ # config.rpcs.get_program.timeout = 20.0
589
+ # end
590
+ #
591
+ # @!attribute [rw] endpoint
592
+ # A custom service endpoint, as a hostname or hostname:port. The default is
593
+ # nil, indicating to use the default endpoint in the current universe domain.
594
+ # @return [::String,nil]
595
+ # @!attribute [rw] credentials
596
+ # Credentials to send with calls. You may provide any of the following types:
597
+ # * (`String`) The path to a service account key file in JSON format
598
+ # * (`Hash`) A service account key as a Hash
599
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
600
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
601
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
602
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
603
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
604
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
605
+ # * (`nil`) indicating no credentials
606
+ #
607
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
608
+ # external source for authentication to Google Cloud, you must validate it before
609
+ # providing it to a Google API client library. Providing an unvalidated credential
610
+ # configuration to Google APIs can compromise the security of your systems and data.
611
+ # For more information, refer to [Validate credential configurations from external
612
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
613
+ # @return [::Object]
614
+ # @!attribute [rw] scope
615
+ # The OAuth scopes
616
+ # @return [::Array<::String>]
617
+ # @!attribute [rw] lib_name
618
+ # The library name as recorded in instrumentation and logging
619
+ # @return [::String]
620
+ # @!attribute [rw] lib_version
621
+ # The library version as recorded in instrumentation and logging
622
+ # @return [::String]
623
+ # @!attribute [rw] channel_args
624
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
625
+ # `GRPC::Core::Channel` object is provided as the credential.
626
+ # @return [::Hash]
627
+ # @!attribute [rw] interceptors
628
+ # An array of interceptors that are run before calls are executed.
629
+ # @return [::Array<::GRPC::ClientInterceptor>]
630
+ # @!attribute [rw] timeout
631
+ # The call timeout in seconds.
632
+ # @return [::Numeric]
633
+ # @!attribute [rw] metadata
634
+ # Additional gRPC headers to be sent with the call.
635
+ # @return [::Hash{::Symbol=>::String}]
636
+ # @!attribute [rw] retry_policy
637
+ # The retry policy. The value is a hash with the following keys:
638
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
639
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
640
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
641
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
642
+ # trigger a retry.
643
+ # @return [::Hash]
644
+ # @!attribute [rw] quota_project
645
+ # A separate project against which to charge quota.
646
+ # @return [::String]
647
+ # @!attribute [rw] universe_domain
648
+ # The universe domain within which to make requests. This determines the
649
+ # default endpoint URL. The default value of nil uses the environment
650
+ # universe (usually the default "googleapis.com" universe).
651
+ # @return [::String,nil]
652
+ # @!attribute [rw] logger
653
+ # A custom logger to use for request/response debug logging, or the value
654
+ # `:default` (the default) to construct a default logger, or `nil` to
655
+ # explicitly disable logging.
656
+ # @return [::Logger,:default,nil]
657
+ #
658
+ class Configuration
659
+ extend ::Gapic::Config
660
+
661
+ # @private
662
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
663
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
664
+
665
+ config_attr :endpoint, nil, ::String, nil
666
+ config_attr :credentials, nil do |value|
667
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
668
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
669
+ allowed.any? { |klass| klass === value }
670
+ end
671
+ config_attr :scope, nil, ::String, ::Array, nil
672
+ config_attr :lib_name, nil, ::String, nil
673
+ config_attr :lib_version, nil, ::String, nil
674
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
675
+ config_attr :interceptors, nil, ::Array, nil
676
+ config_attr :timeout, nil, ::Numeric, nil
677
+ config_attr :metadata, nil, ::Hash, nil
678
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
679
+ config_attr :quota_project, nil, ::String, nil
680
+ config_attr :universe_domain, nil, ::String, nil
681
+ config_attr :logger, :default, ::Logger, nil, :default
682
+
683
+ # @private
684
+ def initialize parent_config = nil
685
+ @parent_config = parent_config unless parent_config.nil?
686
+
687
+ yield self if block_given?
688
+ end
689
+
690
+ ##
691
+ # Configurations for individual RPCs
692
+ # @return [Rpcs]
693
+ #
694
+ def rpcs
695
+ @rpcs ||= begin
696
+ parent_rpcs = nil
697
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
698
+ Rpcs.new parent_rpcs
699
+ end
700
+ end
701
+
702
+ ##
703
+ # Configuration for the channel pool
704
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
705
+ #
706
+ def channel_pool
707
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
708
+ end
709
+
710
+ ##
711
+ # Configuration RPC class for the ProgramsService API.
712
+ #
713
+ # Includes fields providing the configuration for each RPC in this service.
714
+ # Each configuration object is of type `Gapic::Config::Method` and includes
715
+ # the following configuration fields:
716
+ #
717
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
718
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
719
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
720
+ # include the following keys:
721
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
722
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
723
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
724
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
725
+ # trigger a retry.
726
+ #
727
+ class Rpcs
728
+ ##
729
+ # RPC-specific configuration for `get_program`
730
+ # @return [::Gapic::Config::Method]
731
+ #
732
+ attr_reader :get_program
733
+ ##
734
+ # RPC-specific configuration for `list_programs`
735
+ # @return [::Gapic::Config::Method]
736
+ #
737
+ attr_reader :list_programs
738
+ ##
739
+ # RPC-specific configuration for `enable_program`
740
+ # @return [::Gapic::Config::Method]
741
+ #
742
+ attr_reader :enable_program
743
+ ##
744
+ # RPC-specific configuration for `disable_program`
745
+ # @return [::Gapic::Config::Method]
746
+ #
747
+ attr_reader :disable_program
748
+
749
+ # @private
750
+ def initialize parent_rpcs = nil
751
+ get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program
752
+ @get_program = ::Gapic::Config::Method.new get_program_config
753
+ list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs
754
+ @list_programs = ::Gapic::Config::Method.new list_programs_config
755
+ enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program
756
+ @enable_program = ::Gapic::Config::Method.new enable_program_config
757
+ disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program
758
+ @disable_program = ::Gapic::Config::Method.new disable_program_config
759
+
760
+ yield self if block_given?
761
+ end
762
+ end
763
+ end
764
+ end
765
+ end
766
+ end
767
+ end
768
+ end
769
+ end
770
+ end