Skip to content

Commit

Permalink
Paysera.File now gets properly generated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentinas Bartusevičius committed Mar 8, 2021
1 parent 240f2c2 commit d70aee9
Show file tree
Hide file tree
Showing 24 changed files with 476 additions and 226 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 11.4.5
### Fixed
- `Paysera.File` now gets properly generated.

## 11.4.4
### Changed
- Removed demo generation from js client.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"doctrine/orm": "^2.5",
"evp/money": "^2.2",
"paysera/lib-rest-bundle": "^4.0",
"paysera/lib-rest-client-common": "^2.1",
"paysera/lib-rest-client-common": "^2.5",
"paysera/lib-serializer": "^2.0",
"phpunit/phpunit": "^6.5",
"sensio/generator-bundle": "^3.0",
Expand Down
14 changes: 8 additions & 6 deletions composer.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<argument type="string">paysera/lib-rest-client-common</argument>
</call>
<call method="setVersion">
<argument type="string">^1.0 | ^2.1</argument>
<argument type="string">^1.0 | ^2.5</argument>
</call>
</service>
</argument>
Expand Down Expand Up @@ -192,7 +192,7 @@
<argument type="string">paysera/lib-rest-client-common</argument>
</call>
<call method="setVersion">
<argument type="string">^1.0 | ^2.1</argument>
<argument type="string">^1.0 | ^2.5</argument>
</call>
</service>
</argument>
Expand All @@ -219,7 +219,34 @@
<argument type="string">paysera/lib-rest-client-common</argument>
</call>
<call method="setVersion">
<argument type="string">^1.0 | ^2.1</argument>
<argument type="string">^1.0 | ^2.5</argument>
</call>
</service>
</argument>
</call>
</service>
</argument>
</call>
<call method="addTypeConfiguration">
<argument type="service">
<service class="Paysera\Bundle\CodeGeneratorBundle\Entity\TypeConfiguration">
<call method="setTypeName">
<argument>File</argument>
</call>
<call method="setMatchRegex">
<argument type="string">\.file$</argument>
</call>
<call method="setImportString">
<argument type="string">Paysera\Component\RestClientCommon\Entity\File</argument>
</call>
<call method="setLibraryConfiguration">
<argument type="service">
<service class="Paysera\Bundle\CodeGeneratorBundle\Entity\LibraryConfiguration">
<call method="setName">
<argument type="string">paysera/lib-rest-client-common</argument>
</call>
<call method="setVersion">
<argument type="string">^1.0 | ^2.5</argument>
</call>
</service>
</argument>
Expand Down Expand Up @@ -448,21 +475,6 @@
</service>
</argument>
</call>
<!--<call method="addTypeConfiguration">-->
<!--<argument type="service">-->
<!--<service class="Paysera\Bundle\CodeGeneratorBundle\Entity\TypeConfiguration">-->
<!--<call method="setTypeName">-->
<!--<argument>Result</argument>-->
<!--</call>-->
<!--<call method="setMatchRegex">-->
<!--<argument type="string">\w*result$</argument>-->
<!--</call>-->
<!--<call method="setImportString">-->
<!--<argument type="string">Paysera\Component\Serializer\Entity\Result</argument>-->
<!--</call>-->
<!--</service>-->
<!--</argument>-->
<!--</call>-->
</service>
</services>
</container>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require": {
"php": ">=5.5",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"evp/money": "^1.0 || ^2.0",
"fig/http-message-util": "^1.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require": {
"php": ">=5.5",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,24 @@ $result = $categoryClient->createCategory($category);
---


Upload category


```php
use Paysera\Test\CategoryClient\Entity as Entities;

$file = new \Paysera\Component\RestClientCommon\Entity\File();

$file->setName($name);
$file->setContent($content);
$file->setMimeType($mimeType);
$file->setSize($size);

$categoryClient->uploadKeywords($file);
```
---


Standard SQL-style Result filtering


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require": {
"php": ">=5.5",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Fig\Http\Message\RequestMethodInterface;
use Paysera\Component\RestClientCommon\Entity\Entity;
use Paysera\Component\RestClientCommon\Client\ApiClient;
use Paysera\Component\RestClientCommon\Entity\File;
use Paysera\Component\RestClientCommon\Entity\Filter;

class CategoryClient
Expand Down Expand Up @@ -136,6 +137,25 @@ public function createCategory(Entities\Category $category)
return new Entities\Category($data);
}

/**
* Upload category
* PUT /keywords/upload
*
* @param File $file
* @return null
*/
public function uploadKeywords(File $file)
{
$request = $this->apiClient->createRequest(
RequestMethodInterface::METHOD_PUT,
'keywords/upload',
$file
);
$data = $this->apiClient->makeRequest($request);

return null;
}

/**
* Standard SQL-style Result filtering
* GET /keywords
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require": {
"php": ">=5.5",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require": {
"php": ">=5.5",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require": {
"php": ">=5.5",
"evp/money": "^1.0 || ^2.0",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require": {
"php": ">=5.5",
"evp/money": "^1.0 || ^2.0",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require": {
"php": ">=5.5",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require": {
"php": ">=5.5",
"evp/money": "^1.0 || ^2.0",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require": {
"php": ">=5.5",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require": {
"php": ">=5.5",
"evp/money": "^1.0 || ^2.0",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require": {
"php": ">=5.5",
"paysera/lib-rest-client-common": "^1.0 | ^2.1",
"paysera/lib-rest-client-common": "^1.0 | ^2.5",
"fig/http-message-util": "^1.0"
},
"minimum-stability": "stable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
usage: Used in RESTful APIs

types:
File: !include rest/types/file.raml
Money: !include rest/types/money.raml
Result: !include rest/types/result.raml
ResultMetadata: !include rest/types/result-metadata.raml
Cursors: !include rest/types/cursors.raml
UndescribedType: !include rest/types/undescribed-type.raml
traits:
Filter: !include rest/traits/filter.raml

annotationTypes:
datetimeTimestamp: !include rest/annotation-types/datetime-timestamp.raml
entityType: !include rest/annotation-types/entity-type.raml
streamResponse: !include rest/annotation-types/stream-response.raml

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#%RAML 1.0 AnnotationTypeDeclaration
type: nil
description: Used to mark method to return stream interface
allowedTargets: Method
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#%RAML 1.0 DataType
type: object
displayName: Cursor object for cursor pagination
properties:
after:
required: false
description: |
When order_direction = asc, stores the greatest value of the order_by field.
When order_direction = desc, stores the lowest value of the order_by field.
In both order directions the client should use this value when retrieving the next page.
type: string
before:
required: false
description: |
When order_direction = asc, stores the lowest value of the order_by field.
When order_direction = desc, stores the greatest value of the order_by field.
type: string
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#%RAML 1.0 DataType
type: object
displayName: File object
properties:
name:
required: false
type: string
content:
required: true
type: string
mime_type:
required: false
type: string
size:
required: false
type: integer
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,12 @@ traits:
description: Get keywords list
is:
- Paysera.Filter
/upload:
put:
description: Upload category
body:
application/json:
type: Paysera.File
responses:
204:
body: null
Loading

0 comments on commit d70aee9

Please sign in to comment.