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
Accesses Android application developers' Google Play accounts.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
An opaque string that represents a user for quota purposes.
-
#user_ip ⇒ String
Deprecated.
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
49 50 51 52 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 49 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 An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
43 44 45 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 43 def quota_user @quota_user end |
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
47 48 49 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 47 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.
122 123 124 125 126 127 128 129 130 131 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 122 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.
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 81 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.
161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'generated/google/apis/androidpublisher_v1_1/service.rb', line 161 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 |