Class: Google::Apis::AppsmarketV2::AppsmarketService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/appsmarket_v2/service.rb

Overview

Google Apps Marketplace API

Lets your Apps Marketplace applications integrate with Google's licensing service

Examples:

require 'google/apis/appsmarket_v2'

Appsmarket = Google::Apis::AppsmarketV2 # Alias the module
service = Appsmarket::AppsmarketService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeAppsmarketService

Returns a new instance of AppsmarketService



52
53
54
55
# File 'generated/google/apis/appsmarket_v2/service.rb', line 52

def initialize
  super('https://www.googleapis.com/', 'appsmarket/v2/')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

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.

Returns:

  • (String)

    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.



39
40
41
# File 'generated/google/apis/appsmarket_v2/service.rb', line 39

def key
  @key
end

#quota_userString

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. Overrides userIp if both are provided.

Returns:

  • (String)

    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. Overrides userIp if both are provided.



45
46
47
# File 'generated/google/apis/appsmarket_v2/service.rb', line 45

def quota_user
  @quota_user
end

#user_ipString

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.



50
51
52
# File 'generated/google/apis/appsmarket_v2/service.rb', line 50

def user_ip
  @user_ip
end

Instance Method Details

#get_customer_license(application_id, customer_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AppsmarketV2::CustomerLicense

Parameters:

  • application_id (String)

    Application Id

  • customer_id (String)

    Customer Id

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



83
84
85
86
87
88
89
90
91
92
93
# File 'generated/google/apis/appsmarket_v2/service.rb', line 83

def get_customer_license(application_id, customer_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'customerLicense/{applicationId}/{customerId}', options)
  command.response_representation = Google::Apis::AppsmarketV2::CustomerLicense::Representation
  command.response_class = Google::Apis::AppsmarketV2::CustomerLicense
  command.params['applicationId'] = application_id unless application_id.nil?
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_user_license(application_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AppsmarketV2::UserLicense

Parameters:

  • application_id (String)

    Application Id

  • user_id (String)

    User Id

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



165
166
167
168
169
170
171
172
173
174
175
# File 'generated/google/apis/appsmarket_v2/service.rb', line 165

def get_user_license(application_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'userLicense/{applicationId}/{userId}', options)
  command.response_representation = Google::Apis::AppsmarketV2::UserLicense::Representation
  command.response_class = Google::Apis::AppsmarketV2::UserLicense
  command.params['applicationId'] = application_id unless application_id.nil?
  command.params['userId'] = user_id unless user_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_license_notifications(application_id, max_results: nil, start_token: nil, timestamp: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AppsmarketV2::LicenseNotificationList

Parameters:

  • application_id (String)

    Application Id

  • max_results (Fixnum)

    Maximum number of results to return

  • start_token (String)

    Pagination token

  • timestamp (Fixnum)

    Timestamp in milliseconds since epoch

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'generated/google/apis/appsmarket_v2/service.rb', line 125

def list_license_notifications(application_id, max_results: nil, start_token: nil, timestamp: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'licenseNotification/{applicationId}', options)
  command.response_representation = Google::Apis::AppsmarketV2::LicenseNotificationList::Representation
  command.response_class = Google::Apis::AppsmarketV2::LicenseNotificationList
  command.params['applicationId'] = application_id unless application_id.nil?
  command.query['max-results'] = max_results unless max_results.nil?
  command.query['start-token'] = start_token unless start_token.nil?
  command.query['timestamp'] = timestamp unless timestamp.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end