Class: Google::Apis::MybusinessnotificationsV1::MyBusinessNotificationSettingsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MybusinessnotificationsV1::MyBusinessNotificationSettingsService
- Defined in:
- lib/google/apis/mybusinessnotifications_v1/service.rb
Overview
My Business Notifications API
The My Business Notification Settings API enables managing notification settings for business accounts. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://mybusinessnotifications.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#get_account_notification_setting(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessnotificationsV1::NotificationSetting
Returns the pubsub notification settings for the account.
-
#initialize ⇒ MyBusinessNotificationSettingsService
constructor
A new instance of MyBusinessNotificationSettingsService.
-
#update_account_notification_setting(name, notification_setting_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessnotificationsV1::NotificationSetting
Sets the pubsub notification setting for the account informing Google which topic to send pubsub notifications for.
Constructor Details
#initialize ⇒ MyBusinessNotificationSettingsService
Returns a new instance of MyBusinessNotificationSettingsService.
49 50 51 52 53 54 |
# File 'lib/google/apis/mybusinessnotifications_v1/service.rb', line 49 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-mybusinessnotifications_v1', client_version: Google::Apis::MybusinessnotificationsV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
42 43 44 |
# File 'lib/google/apis/mybusinessnotifications_v1/service.rb', line 42 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
47 48 49 |
# File 'lib/google/apis/mybusinessnotifications_v1/service.rb', line 47 def quota_user @quota_user end |
Instance Method Details
#get_account_notification_setting(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessnotificationsV1::NotificationSetting
Returns the pubsub notification settings for the account.
76 77 78 79 80 81 82 83 84 |
# File 'lib/google/apis/mybusinessnotifications_v1/service.rb', line 76 def get_account_notification_setting(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::MybusinessnotificationsV1::NotificationSetting::Representation command.response_class = Google::Apis::MybusinessnotificationsV1::NotificationSetting command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_account_notification_setting(name, notification_setting_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessnotificationsV1::NotificationSetting
Sets the pubsub notification setting for the account informing Google which topic to send pubsub notifications for. Use the notification_types field within notification_setting to manipulate the events an account wants to subscribe to. An account will only have one notification setting resource, and only one pubsub topic can be set. To delete the setting, update with an empty notification_types
116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/google/apis/mybusinessnotifications_v1/service.rb', line 116 def update_account_notification_setting(name, notification_setting_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::MybusinessnotificationsV1::NotificationSetting::Representation command.request_object = notification_setting_object command.response_representation = Google::Apis::MybusinessnotificationsV1::NotificationSetting::Representation command.response_class = Google::Apis::MybusinessnotificationsV1::NotificationSetting command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |