google-shopping-merchant-accounts-v1 0.3.0 → 0.3.2

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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb +20 -3
  3. data/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb +20 -3
  4. data/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb +20 -3
  5. data/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb +4 -1
  6. data/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb +32 -8
  7. data/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb +12 -5
  8. data/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb +7 -4
  9. data/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb +2 -1
  10. data/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb +20 -3
  11. data/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb +20 -3
  12. data/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb +20 -3
  13. data/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb +20 -3
  14. data/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb +20 -3
  15. data/lib/google/shopping/merchant/accounts/v1/developer_registration_service/client.rb +99 -4
  16. data/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb +80 -1
  17. data/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb +59 -0
  18. data/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb +2 -1
  19. data/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb +2 -0
  20. data/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb +20 -3
  21. data/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb +20 -3
  22. data/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb +20 -3
  23. data/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb +20 -3
  24. data/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb +20 -3
  25. data/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/client.rb +20 -3
  26. data/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb +20 -3
  27. data/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb +20 -3
  28. data/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb +20 -3
  29. data/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb +20 -3
  30. data/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb +20 -3
  31. data/lib/google/shopping/merchant/accounts/v1/user_pb.rb +2 -1
  32. data/lib/google/shopping/merchant/accounts/v1/user_service/client.rb +114 -3
  33. data/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb +87 -0
  34. data/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb +62 -0
  35. data/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb +3 -0
  36. data/lib/google/shopping/merchant/accounts/v1/verificationmailsettings_pb.rb +47 -0
  37. data/lib/google/shopping/merchant/accounts/v1/version.rb +1 -1
  38. data/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb +4 -2
  39. data/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb +72 -0
  40. data/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb +18 -5
  41. data/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb +12 -1
  42. data/proto_docs/google/shopping/merchant/accounts/v1/programs.rb +1 -0
  43. data/proto_docs/google/shopping/merchant/accounts/v1/user.rb +14 -2
  44. data/proto_docs/google/shopping/merchant/accounts/v1/verificationmailsettings.rb +53 -0
  45. metadata +3 -1
@@ -956,8 +956,6 @@ module Google
956
956
  # @return [::String,nil]
957
957
  # @!attribute [rw] credentials
958
958
  # Credentials to send with calls. You may provide any of the following types:
959
- # * (`String`) The path to a service account key file in JSON format
960
- # * (`Hash`) A service account key as a Hash
961
959
  # * (`Google::Auth::Credentials`) A googleauth credentials object
962
960
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
963
961
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -966,7 +964,26 @@ module Google
966
964
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
967
965
  # * (`nil`) indicating no credentials
968
966
  #
969
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
967
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
968
+ # is deprecated. Providing an unvalidated credential configuration to
969
+ # Google APIs can compromise the security of your systems and data.
970
+ #
971
+ # @example
972
+ #
973
+ # # The recommended way to provide credentials is to use the `make_creds` method
974
+ # # on the appropriate credentials class for your environment.
975
+ #
976
+ # require "googleauth"
977
+ #
978
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
979
+ # json_key_io: ::File.open("/path/to/keyfile.json")
980
+ # )
981
+ #
982
+ # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config|
983
+ # config.credentials = credentials
984
+ # end
985
+ #
986
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
970
987
  # external source for authentication to Google Cloud, you must validate it before
971
988
  # providing it to a Google API client library. Providing an unvalidated credential
972
989
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -402,8 +402,6 @@ module Google
402
402
  # @return [::String,nil]
403
403
  # @!attribute [rw] credentials
404
404
  # Credentials to send with calls. You may provide any of the following types:
405
- # * (`String`) The path to a service account key file in JSON format
406
- # * (`Hash`) A service account key as a Hash
407
405
  # * (`Google::Auth::Credentials`) A googleauth credentials object
408
406
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
409
407
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -412,7 +410,26 @@ module Google
412
410
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
413
411
  # * (`nil`) indicating no credentials
414
412
  #
415
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
413
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
414
+ # is deprecated. Providing an unvalidated credential configuration to
415
+ # Google APIs can compromise the security of your systems and data.
416
+ #
417
+ # @example
418
+ #
419
+ # # The recommended way to provide credentials is to use the `make_creds` method
420
+ # # on the appropriate credentials class for your environment.
421
+ #
422
+ # require "googleauth"
423
+ #
424
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
425
+ # json_key_io: ::File.open("/path/to/keyfile.json")
426
+ # )
427
+ #
428
+ # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config|
429
+ # config.credentials = credentials
430
+ # end
431
+ #
432
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
416
433
  # external source for authentication to Google Cloud, you must validate it before
417
434
  # providing it to a Google API client library. Providing an unvalidated credential
418
435
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -401,8 +401,6 @@ module Google
401
401
  # @return [::String,nil]
402
402
  # @!attribute [rw] credentials
403
403
  # Credentials to send with calls. You may provide any of the following types:
404
- # * (`String`) The path to a service account key file in JSON format
405
- # * (`Hash`) A service account key as a Hash
406
404
  # * (`Google::Auth::Credentials`) A googleauth credentials object
407
405
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
408
406
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -411,7 +409,26 @@ module Google
411
409
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
412
410
  # * (`nil`) indicating no credentials
413
411
  #
414
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
412
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
413
+ # is deprecated. Providing an unvalidated credential configuration to
414
+ # Google APIs can compromise the security of your systems and data.
415
+ #
416
+ # @example
417
+ #
418
+ # # The recommended way to provide credentials is to use the `make_creds` method
419
+ # # on the appropriate credentials class for your environment.
420
+ #
421
+ # require "googleauth"
422
+ #
423
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
424
+ # json_key_io: ::File.open("/path/to/keyfile.json")
425
+ # )
426
+ #
427
+ # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config|
428
+ # config.credentials = credentials
429
+ # end
430
+ #
431
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
415
432
  # external source for authentication to Google Cloud, you must validate it before
416
433
  # providing it to a Google API client library. Providing an unvalidated credential
417
434
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -485,8 +485,6 @@ module Google
485
485
  # @return [::String,nil]
486
486
  # @!attribute [rw] credentials
487
487
  # Credentials to send with calls. You may provide any of the following types:
488
- # * (`String`) The path to a service account key file in JSON format
489
- # * (`Hash`) A service account key as a Hash
490
488
  # * (`Google::Auth::Credentials`) A googleauth credentials object
491
489
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
492
490
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -495,7 +493,26 @@ module Google
495
493
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
496
494
  # * (`nil`) indicating no credentials
497
495
  #
498
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
496
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
497
+ # is deprecated. Providing an unvalidated credential configuration to
498
+ # Google APIs can compromise the security of your systems and data.
499
+ #
500
+ # @example
501
+ #
502
+ # # The recommended way to provide credentials is to use the `make_creds` method
503
+ # # on the appropriate credentials class for your environment.
504
+ #
505
+ # require "googleauth"
506
+ #
507
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
508
+ # json_key_io: ::File.open("/path/to/keyfile.json")
509
+ # )
510
+ #
511
+ # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config|
512
+ # config.credentials = credentials
513
+ # end
514
+ #
515
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
499
516
  # external source for authentication to Google Cloud, you must validate it before
500
517
  # providing it to a Google API client library. Providing an unvalidated credential
501
518
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -13,7 +13,7 @@ require 'google/protobuf/field_mask_pb'
13
13
  require 'google/shopping/merchant/accounts/v1/accessright_pb'
14
14
 
15
15
 
16
- descriptor_data = "\n/google/shopping/merchant/accounts/v1/user.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x36google/shopping/merchant/accounts/v1/accessright.proto\"\xbe\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.shopping.merchant.accounts.v1.User.StateB\x03\xe0\x41\x03\x12M\n\raccess_rights\x18\x04 \x03(\x0e\x32\x31.google.shopping.merchant.accounts.v1.AccessRightB\x03\xe0\x41\x02\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:S\xea\x41P\n\x1fmerchantapi.googleapis.com/User\x12 accounts/{account}/users/{email}*\x05users2\x04user\"G\n\x0eGetUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\xa4\x01\n\x11\x43reateUserRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x04user\x18\x03 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x01\"J\n\x11\x44\x65leteUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\x88\x01\n\x11UpdateUserRequest\x12=\n\x04user\x18\x01 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x7f\n\x10ListUsersRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x11ListUsersResponse\x12\x39\n\x05users\x18\x01 \x03(\x0b\x32*.google.shopping.merchant.accounts.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcc\x07\n\x0bUserService\x12\xa2\x01\n\x07GetUser\x12\x34.google.shopping.merchant.accounts.v1.GetUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/accounts/v1/{name=accounts/*/users/*}\x12\xbd\x01\n\nCreateUser\x12\x37.google.shopping.merchant.accounts.v1.CreateUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"J\xda\x41\x13parent,user,user_id\x82\xd3\xe4\x93\x02.\"&/accounts/v1/{parent=accounts/*}/users:\x04user\x12\x94\x01\n\nDeleteUser\x12\x37.google.shopping.merchant.accounts.v1.DeleteUserRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/accounts/v1/{name=accounts/*/users/*}\x12\xbf\x01\n\nUpdateUser\x12\x37.google.shopping.merchant.accounts.v1.UpdateUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"L\xda\x41\x10user,update_mask\x82\xd3\xe4\x93\x02\x33\x32+/accounts/v1/{user.name=accounts/*/users/*}:\x04user\x12\xb5\x01\n\tListUsers\x12\x36.google.shopping.merchant.accounts.v1.ListUsersRequest\x1a\x37.google.shopping.merchant.accounts.v1.ListUsersResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/accounts/v1/{parent=accounts/*}/users\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xfc\x01\n(com.google.shopping.merchant.accounts.v1B\tUserProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3"
16
+ descriptor_data = "\n/google/shopping/merchant/accounts/v1/user.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x36google/shopping/merchant/accounts/v1/accessright.proto\"\xbe\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.shopping.merchant.accounts.v1.User.StateB\x03\xe0\x41\x03\x12M\n\raccess_rights\x18\x04 \x03(\x0e\x32\x31.google.shopping.merchant.accounts.v1.AccessRightB\x03\xe0\x41\x02\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:S\xea\x41P\n\x1fmerchantapi.googleapis.com/User\x12 accounts/{account}/users/{email}*\x05users2\x04user\"G\n\x0eGetUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\xa4\x01\n\x11\x43reateUserRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x04user\x18\x03 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x01\"J\n\x11\x44\x65leteUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\x88\x01\n\x11UpdateUserRequest\x12=\n\x04user\x18\x01 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x7f\n\x10ListUsersRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x11ListUsersResponse\x12\x39\n\x05users\x18\x01 \x03(\x0b\x32*.google.shopping.merchant.accounts.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x11VerifySelfRequest\x12;\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account2\x8c\t\n\x0bUserService\x12\xa2\x01\n\x07GetUser\x12\x34.google.shopping.merchant.accounts.v1.GetUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/accounts/v1/{name=accounts/*/users/*}\x12\xbd\x01\n\nCreateUser\x12\x37.google.shopping.merchant.accounts.v1.CreateUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"J\xda\x41\x13parent,user,user_id\x82\xd3\xe4\x93\x02.\"&/accounts/v1/{parent=accounts/*}/users:\x04user\x12\x94\x01\n\nDeleteUser\x12\x37.google.shopping.merchant.accounts.v1.DeleteUserRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/accounts/v1/{name=accounts/*/users/*}\x12\xbf\x01\n\nUpdateUser\x12\x37.google.shopping.merchant.accounts.v1.UpdateUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"L\xda\x41\x10user,update_mask\x82\xd3\xe4\x93\x02\x33\x32+/accounts/v1/{user.name=accounts/*/users/*}:\x04user\x12\xb5\x01\n\tListUsers\x12\x36.google.shopping.merchant.accounts.v1.ListUsersRequest\x1a\x37.google.shopping.merchant.accounts.v1.ListUsersResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/accounts/v1/{parent=accounts/*}/users\x12\xbd\x01\n\nVerifySelf\x12\x37.google.shopping.merchant.accounts.v1.VerifySelfRequest\x1a*.google.shopping.merchant.accounts.v1.User\"J\xda\x41\x07\x61\x63\x63ount\x82\xd3\xe4\x93\x02:25/accounts/v1/{account=accounts/*}/users/me:verifySelf:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xfc\x01\n(com.google.shopping.merchant.accounts.v1B\tUserProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3"
17
17
 
18
18
  pool = Google::Protobuf::DescriptorPool.generated_pool
19
19
 
@@ -53,6 +53,7 @@ module Google
53
53
  UpdateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateUserRequest").msgclass
54
54
  ListUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListUsersRequest").msgclass
55
55
  ListUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListUsersResponse").msgclass
56
+ VerifySelfRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.VerifySelfRequest").msgclass
56
57
  end
57
58
  end
58
59
  end
@@ -661,6 +661,93 @@ module Google
661
661
  raise ::Google::Cloud::Error.from_error(e)
662
662
  end
663
663
 
664
+ ##
665
+ # Updates the user that is represented by the caller from pending to
666
+ # verified.
667
+ #
668
+ # @overload verify_self(request, options = nil)
669
+ # Pass arguments to `verify_self` via a request object, either of type
670
+ # {::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest} or an equivalent Hash.
671
+ #
672
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, ::Hash]
673
+ # A request object representing the call parameters. Required. To specify no
674
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
675
+ # @param options [::Gapic::CallOptions, ::Hash]
676
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
677
+ #
678
+ # @overload verify_self(account: nil)
679
+ # Pass arguments to `verify_self` via keyword arguments. Note that at
680
+ # least one keyword argument is required. To specify no parameters, or to keep all
681
+ # the default parameter values, pass an empty Hash as a request object (see above).
682
+ #
683
+ # @param account [::String]
684
+ # Required. The name of the account under which the caller is a user.
685
+ # Format: `accounts/{account}`
686
+ #
687
+ # @yield [response, operation] Access the result along with the RPC operation
688
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User]
689
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
690
+ #
691
+ # @return [::Google::Shopping::Merchant::Accounts::V1::User]
692
+ #
693
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
694
+ #
695
+ # @example Basic example
696
+ # require "google/shopping/merchant/accounts/v1"
697
+ #
698
+ # # Create a client object. The client can be reused for multiple calls.
699
+ # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new
700
+ #
701
+ # # Create a request. To set request fields, pass in keyword arguments.
702
+ # request = Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new
703
+ #
704
+ # # Call the verify_self method.
705
+ # result = client.verify_self request
706
+ #
707
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User.
708
+ # p result
709
+ #
710
+ def verify_self request, options = nil
711
+ raise ::ArgumentError, "request must be provided" if request.nil?
712
+
713
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest
714
+
715
+ # Converts hash and nil to an options object
716
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
717
+
718
+ # Customize the options with defaults
719
+ metadata = @config.rpcs.verify_self.metadata.to_h
720
+
721
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
722
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
723
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
724
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
725
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
726
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
727
+
728
+ header_params = {}
729
+ if request.account
730
+ header_params["account"] = request.account
731
+ end
732
+
733
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
734
+ metadata[:"x-goog-request-params"] ||= request_params_header
735
+
736
+ options.apply_defaults timeout: @config.rpcs.verify_self.timeout,
737
+ metadata: metadata,
738
+ retry_policy: @config.rpcs.verify_self.retry_policy
739
+
740
+ options.apply_defaults timeout: @config.timeout,
741
+ metadata: @config.metadata,
742
+ retry_policy: @config.retry_policy
743
+
744
+ @user_service_stub.call_rpc :verify_self, request, options: options do |response, operation|
745
+ yield response, operation if block_given?
746
+ end
747
+ rescue ::GRPC::BadStatus => e
748
+ raise ::Google::Cloud::Error.from_error(e)
749
+ end
750
+
664
751
  ##
665
752
  # Configuration class for the UserService API.
666
753
  #
@@ -696,8 +783,6 @@ module Google
696
783
  # @return [::String,nil]
697
784
  # @!attribute [rw] credentials
698
785
  # Credentials to send with calls. You may provide any of the following types:
699
- # * (`String`) The path to a service account key file in JSON format
700
- # * (`Hash`) A service account key as a Hash
701
786
  # * (`Google::Auth::Credentials`) A googleauth credentials object
702
787
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
703
788
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -706,7 +791,26 @@ module Google
706
791
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
707
792
  # * (`nil`) indicating no credentials
708
793
  #
709
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
794
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
795
+ # is deprecated. Providing an unvalidated credential configuration to
796
+ # Google APIs can compromise the security of your systems and data.
797
+ #
798
+ # @example
799
+ #
800
+ # # The recommended way to provide credentials is to use the `make_creds` method
801
+ # # on the appropriate credentials class for your environment.
802
+ #
803
+ # require "googleauth"
804
+ #
805
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
806
+ # json_key_io: ::File.open("/path/to/keyfile.json")
807
+ # )
808
+ #
809
+ # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config|
810
+ # config.credentials = credentials
811
+ # end
812
+ #
813
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
710
814
  # external source for authentication to Google Cloud, you must validate it before
711
815
  # providing it to a Google API client library. Providing an unvalidated credential
712
816
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -852,6 +956,11 @@ module Google
852
956
  # @return [::Gapic::Config::Method]
853
957
  #
854
958
  attr_reader :list_users
959
+ ##
960
+ # RPC-specific configuration for `verify_self`
961
+ # @return [::Gapic::Config::Method]
962
+ #
963
+ attr_reader :verify_self
855
964
 
856
965
  # @private
857
966
  def initialize parent_rpcs = nil
@@ -865,6 +974,8 @@ module Google
865
974
  @update_user = ::Gapic::Config::Method.new update_user_config
866
975
  list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
867
976
  @list_users = ::Gapic::Config::Method.new list_users_config
977
+ verify_self_config = parent_rpcs.verify_self if parent_rpcs.respond_to? :verify_self
978
+ @verify_self = ::Gapic::Config::Method.new verify_self_config
868
979
 
869
980
  yield self if block_given?
870
981
  end
@@ -619,6 +619,86 @@ module Google
619
619
  raise ::Google::Cloud::Error.from_error(e)
620
620
  end
621
621
 
622
+ ##
623
+ # Updates the user that is represented by the caller from pending to
624
+ # verified.
625
+ #
626
+ # @overload verify_self(request, options = nil)
627
+ # Pass arguments to `verify_self` via a request object, either of type
628
+ # {::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest} or an equivalent Hash.
629
+ #
630
+ # @param request [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, ::Hash]
631
+ # A request object representing the call parameters. Required. To specify no
632
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
633
+ # @param options [::Gapic::CallOptions, ::Hash]
634
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
635
+ #
636
+ # @overload verify_self(account: nil)
637
+ # Pass arguments to `verify_self` via keyword arguments. Note that at
638
+ # least one keyword argument is required. To specify no parameters, or to keep all
639
+ # the default parameter values, pass an empty Hash as a request object (see above).
640
+ #
641
+ # @param account [::String]
642
+ # Required. The name of the account under which the caller is a user.
643
+ # Format: `accounts/{account}`
644
+ # @yield [result, operation] Access the result along with the TransportOperation object
645
+ # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User]
646
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
647
+ #
648
+ # @return [::Google::Shopping::Merchant::Accounts::V1::User]
649
+ #
650
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
651
+ #
652
+ # @example Basic example
653
+ # require "google/shopping/merchant/accounts/v1"
654
+ #
655
+ # # Create a client object. The client can be reused for multiple calls.
656
+ # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new
657
+ #
658
+ # # Create a request. To set request fields, pass in keyword arguments.
659
+ # request = Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest.new
660
+ #
661
+ # # Call the verify_self method.
662
+ # result = client.verify_self request
663
+ #
664
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User.
665
+ # p result
666
+ #
667
+ def verify_self request, options = nil
668
+ raise ::ArgumentError, "request must be provided" if request.nil?
669
+
670
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest
671
+
672
+ # Converts hash and nil to an options object
673
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
674
+
675
+ # Customize the options with defaults
676
+ call_metadata = @config.rpcs.verify_self.metadata.to_h
677
+
678
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
679
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
680
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
681
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
682
+ transports_version_send: [:rest]
683
+
684
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
685
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
686
+
687
+ options.apply_defaults timeout: @config.rpcs.verify_self.timeout,
688
+ metadata: call_metadata,
689
+ retry_policy: @config.rpcs.verify_self.retry_policy
690
+
691
+ options.apply_defaults timeout: @config.timeout,
692
+ metadata: @config.metadata,
693
+ retry_policy: @config.retry_policy
694
+
695
+ @user_service_stub.verify_self request, options do |result, operation|
696
+ yield result, operation if block_given?
697
+ end
698
+ rescue ::Gapic::Rest::Error => e
699
+ raise ::Google::Cloud::Error.from_error(e)
700
+ end
701
+
622
702
  ##
623
703
  # Configuration class for the UserService REST API.
624
704
  #
@@ -790,6 +870,11 @@ module Google
790
870
  # @return [::Gapic::Config::Method]
791
871
  #
792
872
  attr_reader :list_users
873
+ ##
874
+ # RPC-specific configuration for `verify_self`
875
+ # @return [::Gapic::Config::Method]
876
+ #
877
+ attr_reader :verify_self
793
878
 
794
879
  # @private
795
880
  def initialize parent_rpcs = nil
@@ -803,6 +888,8 @@ module Google
803
888
  @update_user = ::Gapic::Config::Method.new update_user_config
804
889
  list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
805
890
  @list_users = ::Gapic::Config::Method.new list_users_config
891
+ verify_self_config = parent_rpcs.verify_self if parent_rpcs.respond_to? :verify_self
892
+ @verify_self = ::Gapic::Config::Method.new verify_self_config
806
893
 
807
894
  yield self if block_given?
808
895
  end
@@ -274,6 +274,46 @@ module Google
274
274
  end
275
275
  end
276
276
 
277
+ ##
278
+ # Baseline implementation for the verify_self REST call
279
+ #
280
+ # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest]
281
+ # A request object representing the call parameters. Required.
282
+ # @param options [::Gapic::CallOptions]
283
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
284
+ #
285
+ # @yield [result, operation] Access the result along with the TransportOperation object
286
+ # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User]
287
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
288
+ #
289
+ # @return [::Google::Shopping::Merchant::Accounts::V1::User]
290
+ # A result object deserialized from the server's reply
291
+ def verify_self request_pb, options = nil
292
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
293
+
294
+ verb, uri, query_string_params, body = ServiceStub.transcode_verify_self_request request_pb
295
+ query_string_params = if query_string_params.any?
296
+ query_string_params.to_h { |p| p.split "=", 2 }
297
+ else
298
+ {}
299
+ end
300
+
301
+ response = @client_stub.make_http_request(
302
+ verb,
303
+ uri: uri,
304
+ body: body || "",
305
+ params: query_string_params,
306
+ method_name: "verify_self",
307
+ options: options
308
+ )
309
+ operation = ::Gapic::Rest::TransportOperation.new response
310
+ result = ::Google::Shopping::Merchant::Accounts::V1::User.decode_json response.body, ignore_unknown_fields: true
311
+ catch :response do
312
+ yield result, operation if block_given?
313
+ result
314
+ end
315
+ end
316
+
277
317
  ##
278
318
  # @private
279
319
  #
@@ -380,6 +420,28 @@ module Google
380
420
  )
381
421
  transcoder.transcode request_pb
382
422
  end
423
+
424
+ ##
425
+ # @private
426
+ #
427
+ # GRPC transcoding helper method for the verify_self REST call
428
+ #
429
+ # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest]
430
+ # A request object representing the call parameters. Required.
431
+ # @return [Array(String, [String, nil], Hash{String => String})]
432
+ # Uri, Body, Query string parameters
433
+ def self.transcode_verify_self_request request_pb
434
+ transcoder = Gapic::Rest::GrpcTranscoder.new
435
+ .with_bindings(
436
+ uri_method: :patch,
437
+ uri_template: "/accounts/v1/{account}/users/me:verifySelf",
438
+ body: "*",
439
+ matches: [
440
+ ["account", %r{^accounts/[^/]+/?$}, false]
441
+ ]
442
+ )
443
+ transcoder.transcode request_pb
444
+ end
383
445
  end
384
446
  end
385
447
  end
@@ -49,6 +49,9 @@ module Google
49
49
  rpc :UpdateUser, ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::Google::Shopping::Merchant::Accounts::V1::User
50
50
  # Lists all users of a Merchant Center account.
51
51
  rpc :ListUsers, ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse
52
+ # Updates the user that is represented by the caller from pending to
53
+ # verified.
54
+ rpc :VerifySelf, ::Google::Shopping::Merchant::Accounts::V1::VerifySelfRequest, ::Google::Shopping::Merchant::Accounts::V1::User
52
55
  end
53
56
 
54
57
  Stub = Service.rpc_stub_class
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/shopping/merchant/accounts/v1/verificationmailsettings.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/field_behavior_pb'
8
+
9
+
10
+ descriptor_data = "\nCgoogle/shopping/merchant/accounts/v1/verificationmailsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x90\x02\n\x18VerificationMailSettings\x12x\n\x16verification_mail_mode\x18\x01 \x01(\x0e\x32S.google.shopping.merchant.accounts.v1.VerificationMailSettings.VerificationMailModeB\x03\xe0\x41\x01\"z\n\x14VerificationMailMode\x12&\n\"VERIFICATION_MAIL_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEND_VERIFICATION_MAIL\x10\x01\x12\x1e\n\x1aSUPPRESS_VERIFICATION_MAIL\x10\x02\x42\x90\x02\n(com.google.shopping.merchant.accounts.v1B\x1dVerificationMailSettingsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ]
26
+ imports.each do |type_name, expected_filename|
27
+ import_file = pool.lookup(type_name).file_descriptor
28
+ if import_file.name != expected_filename
29
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
30
+ end
31
+ end
32
+ warn "Each proto file must use a consistent fully-qualified name."
33
+ warn "This will become an error in the next major version."
34
+ end
35
+
36
+ module Google
37
+ module Shopping
38
+ module Merchant
39
+ module Accounts
40
+ module V1
41
+ VerificationMailSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.VerificationMailSettings").msgclass
42
+ VerificationMailSettings::VerificationMailMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.VerificationMailSettings.VerificationMailMode").enummodule
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -22,7 +22,7 @@ module Google
22
22
  module Merchant
23
23
  module Accounts
24
24
  module V1
25
- VERSION = "0.3.0"
25
+ VERSION = "0.3.2"
26
26
  end
27
27
  end
28
28
  end
@@ -22,7 +22,8 @@ module Google
22
22
  module Merchant
23
23
  module Accounts
24
24
  module V1
25
- # The access right.
25
+ # The access right defines the level of permission a
26
+ # user has within a Merchant Center account.
26
27
  module AccessRight
27
28
  # Default value. This value is unused.
28
29
  ACCESS_RIGHT_UNSPECIFIED = 0
@@ -41,7 +42,8 @@ module Google
41
42
  PERFORMANCE_REPORTING = 3
42
43
 
43
44
  # Users with this right have access to Merchant API and its notifications.
44
- # This role is only accessible to accounts that has a developer registration.
45
+ # This role is only accessible to accounts that have a developer
46
+ # registration.
45
47
  API_DEVELOPER = 5
46
48
  end
47
49
  end