Skip to content

Commit

Permalink
Replace swagger-generated Objects client with OpenApi-generated
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasiuk-hubspot committed Jan 3, 2020
1 parent a729558 commit cadc319
Show file tree
Hide file tree
Showing 36 changed files with 5,500 additions and 6,234 deletions.
992 changes: 503 additions & 489 deletions codegen/Crm/Objects/Api/AssociationsApi.php

Large diffs are not rendered by default.

1,678 changes: 857 additions & 821 deletions codegen/Crm/Objects/Api/BasicApi.php

Large diffs are not rendered by default.

1,172 changes: 615 additions & 557 deletions codegen/Crm/Objects/Api/BatchApi.php

Large diffs are not rendered by default.

183 changes: 96 additions & 87 deletions codegen/Crm/Objects/Api/SearchApi.php

Large diffs are not rendered by default.

59 changes: 30 additions & 29 deletions codegen/Crm/Objects/ApiException.php
@@ -1,47 +1,46 @@
<?php
/**
* ApiException
* PHP version 5.
* PHP version 5
*
* @category Class
*
* @author Swagger Codegen team
*
* @see https://github.com/swagger-api/swagger-codegen
* @package HubSpot\Client\Crm\Objects
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/

/**
* CRM Objects.
* CRM Objects
*
* CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
*
* OpenAPI spec version: v3
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 2.4.8
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.3.4
*/

/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

namespace HubSpot\Client\Crm\Objects;

use Exception;
use \Exception;

/**
* ApiException Class Doc Comment.
* ApiException Class Doc Comment
*
* @category Class
*
* @author Swagger Codegen team
*
* @see https://github.com/swagger-api/swagger-codegen
* @package HubSpot\Client\Crm\Objects
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ApiException extends Exception
{

/**
* The HTTP body of the server response either as Json or string.
*
Expand All @@ -52,44 +51,44 @@ class ApiException extends Exception
/**
* The HTTP header of the server response.
*
* @var null|string[]
* @var string[]|null
*/
protected $responseHeaders;

/**
* The deserialized response object.
* The deserialized response object
*
* @var
* $responseObject;*/
* @var $responseObject;
*/
protected $responseObject;

/**
* Constructor.
* Constructor
*
* @param string $message Error message
* @param int $code HTTP status code
* @param null|string[] $responseHeaders HTTP response header
* @param string[]|null $responseHeaders HTTP response header
* @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string
*/
public function __construct($message = '', $code = 0, $responseHeaders = [], $responseBody = null)
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
{
parent::__construct($message, $code);
$this->responseHeaders = $responseHeaders;
$this->responseBody = $responseBody;
}

/**
* Gets the HTTP response header.
* Gets the HTTP response header
*
* @return null|string[] HTTP response header
* @return string[]|null HTTP response header
*/
public function getResponseHeaders()
{
return $this->responseHeaders;
}

/**
* Gets the HTTP body of the server response either as Json or string.
* Gets the HTTP body of the server response either as Json or string
*
* @return mixed HTTP body of the server response either as \stdClass or string
*/
Expand All @@ -99,17 +98,19 @@ public function getResponseBody()
}

/**
* Sets the deseralized response object (during deserialization).
* Sets the deseralized response object (during deserialization)
*
* @param mixed $obj Deserialized response object
*
* @return void
*/
public function setResponseObject($obj)
{
$this->responseObject = $obj;
}

/**
* Gets the deseralized response object (during deserialization).
* Gets the deseralized response object (during deserialization)
*
* @return mixed the deserialized response object
*/
Expand Down

0 comments on commit cadc319

Please sign in to comment.