Skip to content

Commit

Permalink
Regenerated code based on the latest tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Yakushev committed Mar 22, 2019
1 parent e9511e1 commit 486df8a
Show file tree
Hide file tree
Showing 72 changed files with 8,717 additions and 187 deletions.
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

188 changes: 188 additions & 0 deletions src/Model/Generated/Endpoint/AttachmentUser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
<?php
namespace bunq\Model\Generated\Endpoint;

use bunq\Http\ApiClient;
use bunq\Model\Core\BunqModel;
use bunq\Model\Generated\Object\Attachment;

/**
* This call is used to upload an attachment that is accessible only by a
* specific user. This can be used for example to upload passport scans or
* other documents. Attachments supported are png, jpg and gif.
*
* @generated
*/
class AttachmentUser extends BunqModel
{
/**
* Endpoint constants.
*/
const ENDPOINT_URL_READ = 'user/%s/attachment/%s';

/**
* Object type.
*/
const OBJECT_TYPE_GET = 'AttachmentUser';

/**
* The id of the attachment.
*
* @var int
*/
protected $id;

/**
* The timestamp of the attachment's creation.
*
* @var string
*/
protected $created;

/**
* The timestamp of the attachment's last update.
*
* @var string
*/
protected $updated;

/**
* The attachment.
*
* @var Attachment
*/
protected $attachment;

/**
* Get a specific attachment. The header of the response contains the
* content-type of the attachment.
*
* @param int $attachmentUserId
* @param string[] $customHeaders
*
* @return BunqResponseAttachmentUser
*/
public static function get(int $attachmentUserId, array $customHeaders = []): BunqResponseAttachmentUser
{
$apiClient = new ApiClient(static::getApiContext());
$responseRaw = $apiClient->get(
vsprintf(
self::ENDPOINT_URL_READ,
[static::determineUserId(), $attachmentUserId]
),
[],
$customHeaders
);

return BunqResponseAttachmentUser::castFromBunqResponse(
static::fromJson($responseRaw)
);
}

/**
* The id of the attachment.
*
* @return int
*/
public function getId()
{
return $this->id;
}

/**
* @deprecated User should not be able to set values via setters, use
* constructor.
*
* @param int $id
*/
public function setId($id)
{
$this->id = $id;
}

/**
* The timestamp of the attachment's creation.
*
* @return string
*/
public function getCreated()
{
return $this->created;
}

/**
* @deprecated User should not be able to set values via setters, use
* constructor.
*
* @param string $created
*/
public function setCreated($created)
{
$this->created = $created;
}

/**
* The timestamp of the attachment's last update.
*
* @return string
*/
public function getUpdated()
{
return $this->updated;
}

/**
* @deprecated User should not be able to set values via setters, use
* constructor.
*
* @param string $updated
*/
public function setUpdated($updated)
{
$this->updated = $updated;
}

/**
* The attachment.
*
* @return Attachment
*/
public function getAttachment()
{
return $this->attachment;
}

/**
* @deprecated User should not be able to set values via setters, use
* constructor.
*
* @param Attachment $attachment
*/
public function setAttachment($attachment)
{
$this->attachment = $attachment;
}

/**
* @return bool
*/
public function isAllFieldNull()
{
if (!is_null($this->id)) {
return false;
}

if (!is_null($this->created)) {
return false;
}

if (!is_null($this->updated)) {
return false;
}

if (!is_null($this->attachment)) {
return false;
}

return true;
}
}
Loading

0 comments on commit 486df8a

Please sign in to comment.