Class: Google::Apis::AndroidpublisherV1_1::AndroidPublisherService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::AndroidpublisherV1_1::AndroidPublisherService
- Defined in:
- generated/google/apis/androidpublisher_v1_1/service.rb
Overview
Google Play Developer API
Lets Android application developers access their Google Play accounts.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#cancel_purchase(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Cancels a user's subscription purchase.
-
#get_inapppurchase(package_name, product_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidpublisherV1_1::InappPurchase
Checks the purchase and consumption status of an inapp item.
-
#get_purchase(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidpublisherV1_1::SubscriptionPurchase
Checks whether a user's subscription purchase is valid and returns its expiry time.
-
#initialize ⇒ AndroidPublisherService
constructor
A new instance of AndroidPublisherService.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ AndroidPublisherService
Returns a new instance of AndroidPublisherService
51 52 53 54 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'androidpublisher/v1.1/applications/') @batch_path = 'batch/androidpublisher/v1.1' 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.
38 39 40 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 38 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. Overrides userIp if both are provided.
44 45 46 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
49 50 51 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 49 def user_ip @user_ip end |
Instance Method Details
#cancel_purchase(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Cancels a user's subscription purchase. The subscription remains valid until its expiration time.
128 129 130 131 132 133 134 135 136 137 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 128 def cancel_purchase(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{packageName}/subscriptions/{subscriptionId}/purchases/{token}/cancel', ) command.params['packageName'] = package_name unless package_name.nil? command.params['subscriptionId'] = subscription_id unless subscription_id.nil? command.params['token'] = token unless token.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_inapppurchase(package_name, product_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidpublisherV1_1::InappPurchase
Checks the purchase and consumption status of an inapp item.
85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 85 def get_inapppurchase(package_name, product_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{packageName}/inapp/{productId}/purchases/{token}', ) command.response_representation = Google::Apis::AndroidpublisherV1_1::InappPurchase::Representation command.response_class = Google::Apis::AndroidpublisherV1_1::InappPurchase command.params['packageName'] = package_name unless package_name.nil? command.params['productId'] = product_id unless product_id.nil? command.params['token'] = token unless token.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_purchase(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidpublisherV1_1::SubscriptionPurchase
Checks whether a user's subscription purchase is valid and returns its expiry time.
169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 169 def get_purchase(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{packageName}/subscriptions/{subscriptionId}/purchases/{token}', ) command.response_representation = Google::Apis::AndroidpublisherV1_1::SubscriptionPurchase::Representation command.response_class = Google::Apis::AndroidpublisherV1_1::SubscriptionPurchase command.params['packageName'] = package_name unless package_name.nil? command.params['subscriptionId'] = subscription_id unless subscription_id.nil? command.params['token'] = token unless token.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 |