Skip to content

Commit

Permalink
Updated Auto Generated Code
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Jan 20, 2023
1 parent f4c0ac5 commit d93a2e0
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Definitions/FortifiApiDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FortifiApiDefinition extends ApiDefinition
public function __construct()
{
$this->setTitle('Fortifi API');
$this->setVersion('3.120.0');
$this->setVersion('3.121.0');
$this->setDescription(<<<DESCRIPTION
The second version of the Fortifi API is an exciting step forward towards
making it easier for businesses to have open access to their data. We created it
Expand Down
45 changes: 45 additions & 0 deletions src/Endpoints/InteractionsInteractionFidAttachmentEndpoint.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
namespace Fortifi\Api\V1\Endpoints;

use Fortifi\Api\V1\Requests\BoolMessageRequest;
use Fortifi\Api\Core\ApiRequestDetail;
use Fortifi\Api\Core\ApiEndpoint;

class InteractionsInteractionFidAttachmentEndpoint extends ApiEndpoint
{
protected $_path = 'interactions/{interactionFid}/attachment';
protected $_replacements = [];

public function __construct($interactionFid)
{
$this->_replacements['{interactionFid}'] = $interactionFid;
}

/**
* @summary Create an Interaction Attachment
*
* @param $filename
*
* @return BoolMessageRequest
*/
public function create($filename = null)
{
$request = new BoolMessageRequest();
$request->setConnection($this->_getConnection());
$request->setEndpoint($this);

$detail = new ApiRequestDetail();
$detail->setRequireAuth(true);
$detail->setUrl($this->_buildUrl(
str_replace(
array_keys($this->_replacements),
array_values($this->_replacements),
'interactions/{interactionFid}/attachment'
)
));
$detail->addQueryField('filename', $filename);
$detail->setMethod('POST');
$request->setRequestDetail($detail);
return $request;
}
}
12 changes: 12 additions & 0 deletions src/Endpoints/InteractionsInteractionFidEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ public function feedback()
return $endpoint;
}

/**
* @return InteractionsInteractionFidAttachmentEndpoint
*/
public function attachment()
{
$endpoint = new InteractionsInteractionFidAttachmentEndpoint(
$this->_replacements['{interactionFid}']
);
$endpoint->_buildFromEndpoint($this);
return $endpoint;
}

/**
* @summary Get an interaction
*
Expand Down
34 changes: 33 additions & 1 deletion swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
swagger: '2.0'
info:
title: Fortifi API
version: '3.120.0'
version: '3.121.0'
termsOfService: 'https://fortifi.io/legal/terms/api'
description: >
The second version of the Fortifi API is an exciting step forward towards
Expand Down Expand Up @@ -5514,6 +5514,38 @@ paths:
description: Error
schema:
$ref: '#/definitions/Envelope'


'/interactions/{interactionFid}/attachment':
post:
summary: Create an Interaction Attachment
tags:
- interactions
security:
- OAuth:
- interactions
- accessToken: [ ]
parameters:
- $ref: '#/parameters/interactionFid'
- name: filename
in: query
required: false
type: string
responses:
200:
description: Attachment Successfully Created
schema:
allOf:
- $ref: '#/definitions/Envelope'
- properties:
data:
$ref: '#/definitions/BoolMessage'
x-400:
description: Couldn't add attachment to interaction
default:
description: Error
schema:
$ref: '#/definitions/Envelope'
'/licence/check':
get:
summary: Retrieve A Licence
Expand Down

0 comments on commit d93a2e0

Please sign in to comment.