Class: Google::Apis::PaymentsresellersubscriptionV1::PaymentsResellerSubscriptionService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/paymentsresellersubscription_v1/service.rb

Overview

Payments Reseller Subscription API

Examples:

require 'google/apis/paymentsresellersubscription_v1'

Paymentsresellersubscription = Google::Apis::PaymentsresellersubscriptionV1 # Alias the module
service = Paymentsresellersubscription::PaymentsResellerSubscriptionService.new

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePaymentsResellerSubscriptionService

Returns a new instance of PaymentsResellerSubscriptionService.



45
46
47
48
49
50
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 45

def initialize
  super('https://paymentsresellersubscription.googleapis.com/', '',
        client_name: 'google-apis-paymentsresellersubscription_v1',
        client_version: Google::Apis::PaymentsresellersubscriptionV1::GEM_VERSION)
  @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.



38
39
40
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 38

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.

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.



43
44
45
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 43

def quota_user
  @quota_user
end

Instance Method Details

#cancel_partner_subscription(name, google_cloud_payments_reseller_subscription_v1_cancel_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionResponse

Used by partners to cancel a subscription service either immediately or by the end of the current billing cycle for their customers. It should be called directly by the partner using service accounts.

Parameters:

  • name (String)

    Required. The name of the subscription resource to be cancelled. It will have the format of "partners/partner_id/subscriptions/subscription_id"

  • google_cloud_payments_reseller_subscription_v1_cancel_subscription_request_object (Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



211
212
213
214
215
216
217
218
219
220
221
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 211

def cancel_partner_subscription(name, google_cloud_payments_reseller_subscription_v1_cancel_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:cancel', options)
  command.request_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionRequest::Representation
  command.request_object = google_cloud_payments_reseller_subscription_v1_cancel_subscription_request_object
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionResponse::Representation
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionResponse
  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

#create_partner_subscription(parent, google_cloud_payments_reseller_subscription_v1_subscription_object = nil, subscription_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription

Used by partners to create a subscription for their customers. The created subscription is associated with the end user inferred from the end user credentials. This API must be authorized by the end user using OAuth.

Parameters:

  • parent (String)

    Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/partner_id".

  • google_cloud_payments_reseller_subscription_v1_subscription_object (Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription) (defaults to: nil)
  • subscription_id (String) (defaults to: nil)

    Required. Identifies the subscription resource on the Partner side. The value is restricted to 63 ASCII characters at the maximum. If a subscription was previously created with the same subscription_id, we will directly return that one.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 252

def create_partner_subscription(parent, google_cloud_payments_reseller_subscription_v1_subscription_object = nil, subscription_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/subscriptions', options)
  command.request_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription::Representation
  command.request_object = google_cloud_payments_reseller_subscription_v1_subscription_object
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription::Representation
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription
  command.params['parent'] = parent unless parent.nil?
  command.query['subscriptionId'] = subscription_id unless subscription_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#entitle_partner_subscription(name, google_cloud_payments_reseller_subscription_v1_entitle_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse

Used by partners to entitle a previously provisioned subscription to the current end user. The end user identity is inferred from the authorized credential of the request. This API must be authorized by the end user using OAuth.

Parameters:

  • name (String)

    Required. The name of the subscription resource that is entitled to the current end user. It will have the format of "partners/partner_id/ subscriptions/subscription_id"

  • google_cloud_payments_reseller_subscription_v1_entitle_subscription_request_object (Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



291
292
293
294
295
296
297
298
299
300
301
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 291

def entitle_partner_subscription(name, google_cloud_payments_reseller_subscription_v1_entitle_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:entitle', options)
  command.request_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest::Representation
  command.request_object = google_cloud_payments_reseller_subscription_v1_entitle_subscription_request_object
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse::Representation
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse
  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

#extend_partner_subscription(name, google_cloud_payments_reseller_subscription_v1_extend_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionResponse

Used by partners to extend a subscription service for their customers on an ongoing basis for the subscription to remain active and renewable. It should be called directly by the partner using service accounts.

Parameters:

  • name (String)

    Required. The name of the subscription resource to be extended. It will have the format of "partners/partner_id/subscriptions/subscription_id".

  • google_cloud_payments_reseller_subscription_v1_extend_subscription_request_object (Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



327
328
329
330
331
332
333
334
335
336
337
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 327

def extend_partner_subscription(name, google_cloud_payments_reseller_subscription_v1_extend_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:extend', options)
  command.request_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionRequest::Representation
  command.request_object = google_cloud_payments_reseller_subscription_v1_extend_subscription_request_object
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionResponse::Representation
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionResponse
  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

#find_partner_promotion_eligible(parent, google_cloud_payments_reseller_subscription_v1_find_eligible_promotions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse

To find eligible promotions for the current user. The API requires user authorization via OAuth. The user is inferred from the authenticated OAuth credential.

Parameters:

  • parent (String)

    Required. The parent, the partner that can resell. Format: partners/partner

  • google_cloud_payments_reseller_subscription_v1_find_eligible_promotions_request_object (Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



124
125
126
127
128
129
130
131
132
133
134
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 124

def find_partner_promotion_eligible(parent, google_cloud_payments_reseller_subscription_v1_find_eligible_promotions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/promotions:findEligible', options)
  command.request_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsRequest::Representation
  command.request_object = google_cloud_payments_reseller_subscription_v1_find_eligible_promotions_request_object
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse::Representation
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_partner_subscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription

Used by partners to get a subscription by id. It should be called directly by the partner using service accounts.

Parameters:

  • name (String)

    Required. The name of the subscription resource to retrieve. It will have the format of "partners/partner_id/subscriptions/subscription_id"

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



361
362
363
364
365
366
367
368
369
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 361

def get_partner_subscription(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription::Representation
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription
  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

#list_partner_products(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse

To retrieve the products that can be resold by the partner. It should be autenticated with a service account.

Parameters:

  • parent (String)

    Required. The parent, the partner that can resell. Format: partners/partner

  • filter (String) (defaults to: nil)

    Optional. Specifies the filters for the products results. The syntax defined in the EBNF grammar: https://google.aip.dev/assets/misc/ebnf-filtering.txt. An error will be thrown if any specified parameter is not supported. Currently, it can only be used by Youtube partners. Allowed parameters are: - regionCodes

    • zipCode - eligibilityId Multiple parameters can be specified, for example: " regionCodes=US zipCode=94043 eligibilityId=2022H1Campaign"
  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of products to return. The service may return fewer than this value. If unspecified, at most 50 products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

  • page_token (String) (defaults to: nil)

    Optional. A page token, received from a previous ListProducts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListProducts must match the call that provided the page token.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 88

def list_partner_products(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/products', options)
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse::Representation
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_partner_promotions(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ListPromotionsResponse

To retrieve the promotions, such as free trial, that can be used by the partner. It should be autenticated with a service account.

Parameters:

  • parent (String)

    Required. The parent, the partner that can resell. Format: partners/partner

  • filter (String) (defaults to: nil)

    Optional. Specifies the filters for the promotion results. The syntax defined in the EBNF grammar: https://google.aip.dev/assets/misc/ebnf-filtering.txt. An error will be thrown if the specified parameter(s) is not supported. Currently, it can only be used by Youtube partners. Allowed parameters are: - region_codes: "US" - zip_code: "94043" - eligibility_id: "2022H1Campaign" Multiple parameters can be specified, for example: "region_codes=US zip_code= 94043 eligibility_id=2022H1Campaign"

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

  • page_token (String) (defaults to: nil)

    Optional. A page token, received from a previous ListPromotions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListPromotions must match the call that provided the page token.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 174

def list_partner_promotions(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/promotions', options)
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ListPromotionsResponse::Representation
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1ListPromotionsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#provision_partner_subscription(parent, google_cloud_payments_reseller_subscription_v1_subscription_object = nil, subscription_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription

Used by partners to provision a subscription for their customers. This creates a subscription without associating it with the end user account. EntitleSubscription must be called separately using OAuth in order for the end user account to be associated with the subscription. It should be called directly by the partner using service accounts.

Parameters:

  • parent (String)

    Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/partner_id".

  • google_cloud_payments_reseller_subscription_v1_subscription_object (Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription) (defaults to: nil)
  • subscription_id (String) (defaults to: nil)

    Required. Identifies the subscription resource on the Partner side. The value is restricted to 63 ASCII characters at the maximum. If a subscription was previously created with the same subscription_id, we will directly return that one.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



402
403
404
405
406
407
408
409
410
411
412
413
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 402

def provision_partner_subscription(parent, google_cloud_payments_reseller_subscription_v1_subscription_object = nil, subscription_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/subscriptions:provision', options)
  command.request_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription::Representation
  command.request_object = google_cloud_payments_reseller_subscription_v1_subscription_object
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription::Representation
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription
  command.params['parent'] = parent unless parent.nil?
  command.query['subscriptionId'] = subscription_id unless subscription_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#undo_partner_subscription_cancel(name, google_cloud_payments_reseller_subscription_v1_undo_cancel_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionResponse

Used by partners to revoke the pending cancellation of a subscription, which is currently in STATE_CANCEL_AT_END_OF_CYCLE state. If the subscription is already cancelled, the request will fail. It should be called directly by the partner using service accounts.

Parameters:

  • name (String)

    Required. The name of the subscription resource whose pending cancellation needs to be undone. It will have the format of "partners/partner_id/ subscriptions/subscription_id"

  • google_cloud_payments_reseller_subscription_v1_undo_cancel_subscription_request_object (Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



441
442
443
444
445
446
447
448
449
450
451
# File 'lib/google/apis/paymentsresellersubscription_v1/service.rb', line 441

def undo_partner_subscription_cancel(name, google_cloud_payments_reseller_subscription_v1_undo_cancel_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:undoCancel', options)
  command.request_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionRequest::Representation
  command.request_object = google_cloud_payments_reseller_subscription_v1_undo_cancel_subscription_request_object
  command.response_representation = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionResponse::Representation
  command.response_class = Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionResponse
  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