lib/square/api/subscriptions_api.rb
def delete_subscription_action(subscription_id:,
                                   action_id:)
      # Prepare query url.
      _query_builder = config.get_base_uri
      _query_builder << '/v2/subscriptions/{subscription_id}/actions/{action_id}'
      _query_builder = APIHelper.append_url_with_template_parameters(
        _query_builder,
        'subscription_id' => { 'value' => subscription_id, 'encode' => true },
        'action_id' => { 'value' => action_id, 'encode' => true }
      )
      _query_url = APIHelper.clean_url _query_builder

      # Prepare headers.
      _headers = {
        'accept' => 'application/json'
      }

      # Prepare and execute HttpRequest.
      _request = config.http_client.delete(
        _query_url,
        headers: _headers
      )
      OAuth2.apply(config, _request)
      _response = execute_request(_request)

      # Return appropriate response type.
      decoded = APIHelper.json_deserialize(_response.raw_body)
      _errors = APIHelper.map_response(decoded, ['errors'])
      ApiResponse.new(
        _response, data: decoded, errors: _errors
      )
    end
# Deletes a scheduled action for a subscription.
# @param [String] subscription_id Required parameter: The ID of the
# subscription the targeted action is to act upon.
# @param [String] action_id Required parameter: The ID of the targeted
# action to be deleted.
# @return [DeleteSubscriptionActionResponse Hash] response from the API call
Deletes a scheduled action for a subscription.
Deletes a scheduled action for a subscription .
def delete_subscription_action(subscription_id:,
                                   action_id:)
      _query_builder = config.get_base_uri
      _query_builder << '/v2/subscriptions/{subscription_id}/actions/{action_id}'
      _query_builder = APIHelper.append_url_with_template_parameters(
        _query_builder,
        'subscription_id' => { 'value' => subscription_id, 'encode' => true },
        'action_id' => { 'value' => action_id, 'encode' => true }
      )
      _query_url = APIHelper.clean_url _query_builder
      _headers = {
        'accept' => 'application/json'
      }
      _request = config.http_client.delete(
        _query_url,
        headers: _headers
      )
      OAuth2.apply(config, _request)
      _response = execute_request(_request)
      decoded = APIHelper.json_deserialize(_response.raw_body)
      _errors = APIHelper.map_response(decoded, ['errors'])
      ApiResponse.new(
        _response, data: decoded, errors: _errors
      )
    end
def delete_subscription_action ( subscription_id : , action_id : ) _query_builder = config . get_base_uri _query_builder << '/v2/subscriptions/{subscription_id}/actions/{action_id}' _query_builder = APIHelper . append_url_with_template_parameters ( _query_builder , 'subscription_id' => { 'value' => subscription_id , 'encode' => true } , 'action_id' => { 'value' => action_id , 'encode' => true } ) _query_url = APIHelper . clean_url _query_builder _headers = { 'accept' => 'application/json' } _request = config . http_client . delete ( _query_url , headers : _headers ) OAuth2 . apply ( config , _request ) _response = execute_request ( _request ) decoded = APIHelper . json_deserialize ( _response . raw_body ) _errors = APIHelper . map_response ( decoded , [ 'errors' ] ) ApiResponse . new ( _response , data : decoded , errors : _errors ) end
Deletes a scheduled action for a subscription.
Deletes a scheduled action for a subscription .
# Prepare query url. # Prepare headers. # Prepare and execute HttpRequest. # Return appropriate response type.
response from the API call
response from the API call
DeleteSubscriptionActionResponse Hash
subscription_id
action_id
action_id Required parameter: The ID of the targeted action to be deleted.
action_id Required parameter : The ID of the targeted action to be deleted .