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.
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.
47 48 49 50 51 52 |
# File 'lib/google/apis/mybusinessnotifications_v1/service.rb', line 47 def initialize super('https://mybusinessnotifications.googleapis.com/', '', 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.
40 41 42 |
# File 'lib/google/apis/mybusinessnotifications_v1/service.rb', line 40 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.
45 46 47 |
# File 'lib/google/apis/mybusinessnotifications_v1/service.rb', line 45 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.
74 75 76 77 78 79 80 81 82 |
# File 'lib/google/apis/mybusinessnotifications_v1/service.rb', line 74 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
114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/google/apis/mybusinessnotifications_v1/service.rb', line 114 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 |