Skip to content

Commit

Permalink
refactor sdk (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: Unknown <[email protected]>
  • Loading branch information
magnomoreira and samuelleitemundipagg authored Dec 23, 2022
1 parent 8d5539c commit 9806235
Show file tree
Hide file tree
Showing 198 changed files with 4,164 additions and 5,754 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

## Introduction

Pagarme API

Under maintenance :hammer: :construction:
Pagarme API

## Building

Expand Down
4 changes: 1 addition & 3 deletions doc/controllers/charges.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,8 @@ $request_customer = new Models\CreateCustomerRequest(
$request_customer_code
);
$request_payment_paymentMethod = 'payment_method2';
$request_payment_privateLabel = new Models\CreatePrivateLabelPaymentRequest();
$request_payment = new Models\CreatePaymentRequest(
$request_payment_paymentMethod,
$request_payment_privateLabel
$request_payment_paymentMethod
);
$request_metadata = ['key0' => 'metadata3'];
$request_antifraud_type = 'type0';
Expand Down
8 changes: 2 additions & 6 deletions doc/controllers/orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,13 @@ $body_customer = new Models\CreateCustomerRequest(
$body_payments = [];

$body_payments_0_paymentMethod = 'payment_method0';
$body_payments_0_privateLabel = new Models\CreatePrivateLabelPaymentRequest();
$body_payments[0] = new Models\CreatePaymentRequest(
$body_payments_0_paymentMethod,
$body_payments_0_privateLabel
$body_payments_0_paymentMethod
);

$body_payments_1_paymentMethod = 'payment_method9';
$body_payments_1_privateLabel = new Models\CreatePrivateLabelPaymentRequest();
$body_payments[1] = new Models\CreatePaymentRequest(
$body_payments_1_paymentMethod,
$body_payments_1_privateLabel
$body_payments_1_paymentMethod
);

$body_code = 'code4';
Expand Down
4 changes: 1 addition & 3 deletions doc/controllers/subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -1078,10 +1078,8 @@ $body_metadata = ['key0' => 'metadata7', 'key1' => 'metadata8'];
$body_setup_amount = 150;
$body_setup_description = 'description0';
$body_setup_payment_paymentMethod = 'payment_method4';
$body_setup_payment_privateLabel = new Models\CreatePrivateLabelPaymentRequest();
$body_setup_payment = new Models\CreatePaymentRequest(
$body_setup_payment_paymentMethod,
$body_setup_payment_privateLabel
$body_setup_payment_paymentMethod
);
$body_setup = new Models\CreateSetupRequest(
$body_setup_amount,
Expand Down
15 changes: 2 additions & 13 deletions doc/models/create-payment-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Payment data
| `customer` | [`?CreateCustomerRequest`](../../doc/models/create-customer-request.md) | Optional | Customer | getCustomer(): ?CreateCustomerRequest | setCustomer(?CreateCustomerRequest customer): void |
| `metadata` | `?array<string,string>` | Optional | Metadata | getMetadata(): ?array | setMetadata(?array metadata): void |
| `cash` | [`?CreateCashPaymentRequest`](../../doc/models/create-cash-payment-request.md) | Optional | Settings for cash payment | getCash(): ?CreateCashPaymentRequest | setCash(?CreateCashPaymentRequest cash): void |
| `privateLabel` | [`CreatePrivateLabelPaymentRequest`](../../doc/models/create-private-label-payment-request.md) | Required | Settings for private label payment | getPrivateLabel(): CreatePrivateLabelPaymentRequest | setPrivateLabel(CreatePrivateLabelPaymentRequest privateLabel): void |
| `privateLabel` | [`?CreatePrivateLabelPaymentRequest`](../../doc/models/create-private-label-payment-request.md) | Optional | Settings for private label payment | getPrivateLabel(): ?CreatePrivateLabelPaymentRequest | setPrivateLabel(?CreatePrivateLabelPaymentRequest privateLabel): void |
| `pix` | [`?CreatePixPaymentRequest`](../../doc/models/create-pix-payment-request.md) | Optional | Settings for pix payment | getPix(): ?CreatePixPaymentRequest | setPix(?CreatePixPaymentRequest pix): void |

## Example (as JSON)
Expand All @@ -48,18 +48,7 @@ Payment data
"customer": null,
"metadata": null,
"cash": null,
"private_label": {
"installments": null,
"statement_descriptor": null,
"card": null,
"card_id": null,
"card_token": null,
"recurrence": null,
"capture": null,
"extended_limit_enabled": null,
"extended_limit_code": null,
"recurrency_cycle": null
},
"private_label": null,
"pix": null
}
```
Expand Down
13 changes: 1 addition & 12 deletions doc/models/create-setup-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,7 @@ Request for creating a Setup for a subscription. The setup is an order that will
"customer": null,
"metadata": null,
"cash": null,
"private_label": {
"installments": null,
"statement_descriptor": null,
"card": null,
"card_id": null,
"card_token": null,
"recurrence": null,
"capture": null,
"extended_limit_enabled": null,
"extended_limit_code": null,
"recurrency_cycle": null
},
"private_label": null,
"pix": null
}
}
Expand Down
6 changes: 3 additions & 3 deletions doc/models/error-exception.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Api Error Exception

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `message` | `string` | Required | - | getMessage(): string | setMessage(string message): void |
| `errors` | `array` | Required | - | getErrors(): array | setErrors(array errors): void |
| `request` | `array` | Required | - | getRequest(): array | setRequest(array request): void |
| `message` | `?string` | Required | - | getMessage(): ?string | setMessage(?string message): void |
| `errors` | `?array` | Required | - | getErrors(): ?array | setErrors(?array errors): void |
| `request` | `?array` | Required | - | getRequest(): ?array | setRequest(?array request): void |

## Example (as JSON)

Expand Down
8 changes: 4 additions & 4 deletions doc/models/get-access-token-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Response object for getting a access token

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `id` | `string` | Required | - | getId(): string | setId(string id): void |
| `code` | `string` | Required | - | getCode(): string | setCode(string code): void |
| `status` | `string` | Required | - | getStatus(): string | setStatus(string status): void |
| `createdAt` | `\DateTime` | Required | - | getCreatedAt(): \DateTime | setCreatedAt(\DateTime createdAt): void |
| `id` | `?string` | Required | - | getId(): ?string | setId(?string id): void |
| `code` | `?string` | Required | - | getCode(): ?string | setCode(?string code): void |
| `status` | `?string` | Required | - | getStatus(): ?string | setStatus(?string status): void |
| `createdAt` | `?\DateTime` | Required | - | getCreatedAt(): ?\DateTime | setCreatedAt(?\DateTime createdAt): void |
| `customer` | [`?GetCustomerResponse`](../../doc/models/get-customer-response.md) | Optional | - | getCustomer(): ?GetCustomerResponse | setCustomer(?GetCustomerResponse customer): void |

## Example (as JSON)
Expand Down
30 changes: 15 additions & 15 deletions doc/models/get-address-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ Response object for getting an Address

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `id` | `string` | Required | - | getId(): string | setId(string id): void |
| `street` | `string` | Required | - | getStreet(): string | setStreet(string street): void |
| `number` | `string` | Required | - | getNumber(): string | setNumber(string number): void |
| `complement` | `string` | Required | - | getComplement(): string | setComplement(string complement): void |
| `zipCode` | `string` | Required | - | getZipCode(): string | setZipCode(string zipCode): void |
| `neighborhood` | `string` | Required | - | getNeighborhood(): string | setNeighborhood(string neighborhood): void |
| `city` | `string` | Required | - | getCity(): string | setCity(string city): void |
| `state` | `string` | Required | - | getState(): string | setState(string state): void |
| `country` | `string` | Required | - | getCountry(): string | setCountry(string country): void |
| `status` | `string` | Required | - | getStatus(): string | setStatus(string status): void |
| `createdAt` | `\DateTime` | Required | - | getCreatedAt(): \DateTime | setCreatedAt(\DateTime createdAt): void |
| `updatedAt` | `\DateTime` | Required | - | getUpdatedAt(): \DateTime | setUpdatedAt(\DateTime updatedAt): void |
| `id` | `?string` | Required | - | getId(): ?string | setId(?string id): void |
| `street` | `?string` | Required | - | getStreet(): ?string | setStreet(?string street): void |
| `number` | `?string` | Required | - | getNumber(): ?string | setNumber(?string number): void |
| `complement` | `?string` | Required | - | getComplement(): ?string | setComplement(?string complement): void |
| `zipCode` | `?string` | Required | - | getZipCode(): ?string | setZipCode(?string zipCode): void |
| `neighborhood` | `?string` | Required | - | getNeighborhood(): ?string | setNeighborhood(?string neighborhood): void |
| `city` | `?string` | Required | - | getCity(): ?string | setCity(?string city): void |
| `state` | `?string` | Required | - | getState(): ?string | setState(?string state): void |
| `country` | `?string` | Required | - | getCountry(): ?string | setCountry(?string country): void |
| `status` | `?string` | Required | - | getStatus(): ?string | setStatus(?string status): void |
| `createdAt` | `?\DateTime` | Required | - | getCreatedAt(): ?\DateTime | setCreatedAt(?\DateTime createdAt): void |
| `updatedAt` | `?\DateTime` | Required | - | getUpdatedAt(): ?\DateTime | setUpdatedAt(?\DateTime updatedAt): void |
| `customer` | [`?GetCustomerResponse`](../../doc/models/get-customer-response.md) | Optional | - | getCustomer(): ?GetCustomerResponse | setCustomer(?GetCustomerResponse customer): void |
| `metadata` | `array<string,string>` | Required | - | getMetadata(): array | setMetadata(array metadata): void |
| `line1` | `string` | Required | Line 1 for address | getLine1(): string | setLine1(string line1): void |
| `line2` | `string` | Required | Line 2 for address | getLine2(): string | setLine2(string line2): void |
| `metadata` | `?array<string,string>` | Required | - | getMetadata(): ?array | setMetadata(?array metadata): void |
| `line1` | `?string` | Required | Line 1 for address | getLine1(): ?string | setLine1(?string line1): void |
| `line2` | `?string` | Required | Line 2 for address | getLine2(): ?string | setLine2(?string line2): void |
| `deletedAt` | `?\DateTime` | Optional | - | getDeletedAt(): ?\DateTime | setDeletedAt(?\DateTime deletedAt): void |

## Example (as JSON)
Expand Down
4 changes: 2 additions & 2 deletions doc/models/get-anticipation-limit-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Anticipation limit

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `amount` | `int` | Required | Amount | getAmount(): int | setAmount(int amount): void |
| `anticipationFee` | `int` | Required | Anticipation fee | getAnticipationFee(): int | setAnticipationFee(int anticipationFee): void |
| `amount` | `?int` | Required | Amount | getAmount(): ?int | setAmount(?int amount): void |
| `anticipationFee` | `?int` | Required | Anticipation fee | getAnticipationFee(): ?int | setAnticipationFee(?int anticipationFee): void |

## Example (as JSON)

Expand Down
4 changes: 2 additions & 2 deletions doc/models/get-anticipation-limits-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Anticipation limits

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `max` | [`GetAnticipationLimitResponse`](../../doc/models/get-anticipation-limit-response.md) | Required | Max limit | getMax(): GetAnticipationLimitResponse | setMax(GetAnticipationLimitResponse max): void |
| `min` | [`GetAnticipationLimitResponse`](../../doc/models/get-anticipation-limit-response.md) | Required | Min limit | getMin(): GetAnticipationLimitResponse | setMin(GetAnticipationLimitResponse min): void |
| `max` | [`?GetAnticipationLimitResponse`](../../doc/models/get-anticipation-limit-response.md) | Required | Max limit | getMax(): ?GetAnticipationLimitResponse | setMax(?GetAnticipationLimitResponse max): void |
| `min` | [`?GetAnticipationLimitResponse`](../../doc/models/get-anticipation-limit-response.md) | Required | Min limit | getMin(): ?GetAnticipationLimitResponse | setMin(?GetAnticipationLimitResponse min): void |

## Example (as JSON)

Expand Down
18 changes: 9 additions & 9 deletions doc/models/get-anticipation-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ Anticipation

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `id` | `string` | Required | Id | getId(): string | setId(string id): void |
| `requestedAmount` | `int` | Required | Requested amount | getRequestedAmount(): int | setRequestedAmount(int requestedAmount): void |
| `approvedAmount` | `int` | Required | Approved amount | getApprovedAmount(): int | setApprovedAmount(int approvedAmount): void |
| `id` | `?string` | Required | Id | getId(): ?string | setId(?string id): void |
| `requestedAmount` | `?int` | Required | Requested amount | getRequestedAmount(): ?int | setRequestedAmount(?int requestedAmount): void |
| `approvedAmount` | `?int` | Required | Approved amount | getApprovedAmount(): ?int | setApprovedAmount(?int approvedAmount): void |
| `recipient` | [`?GetRecipientResponse`](../../doc/models/get-recipient-response.md) | Optional | Recipient | getRecipient(): ?GetRecipientResponse | setRecipient(?GetRecipientResponse recipient): void |
| `pgid` | `string` | Required | Anticipation id on the gateway | getPgid(): string | setPgid(string pgid): void |
| `createdAt` | `\DateTime` | Required | Creation date | getCreatedAt(): \DateTime | setCreatedAt(\DateTime createdAt): void |
| `updatedAt` | `\DateTime` | Required | Last update date | getUpdatedAt(): \DateTime | setUpdatedAt(\DateTime updatedAt): void |
| `paymentDate` | `\DateTime` | Required | Payment date | getPaymentDate(): \DateTime | setPaymentDate(\DateTime paymentDate): void |
| `status` | `string` | Required | Status | getStatus(): string | setStatus(string status): void |
| `timeframe` | `string` | Required | Timeframe | getTimeframe(): string | setTimeframe(string timeframe): void |
| `pgid` | `?string` | Required | Anticipation id on the gateway | getPgid(): ?string | setPgid(?string pgid): void |
| `createdAt` | `?\DateTime` | Required | Creation date | getCreatedAt(): ?\DateTime | setCreatedAt(?\DateTime createdAt): void |
| `updatedAt` | `?\DateTime` | Required | Last update date | getUpdatedAt(): ?\DateTime | setUpdatedAt(?\DateTime updatedAt): void |
| `paymentDate` | `?\DateTime` | Required | Payment date | getPaymentDate(): ?\DateTime | setPaymentDate(?\DateTime paymentDate): void |
| `status` | `?string` | Required | Status | getStatus(): ?string | setStatus(?string status): void |
| `timeframe` | `?string` | Required | Timeframe | getTimeframe(): ?string | setTimeframe(?string timeframe): void |

## Example (as JSON)

Expand Down
10 changes: 5 additions & 5 deletions doc/models/get-antifraud-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `status` | `string` | Required | - | getStatus(): string | setStatus(string status): void |
| `returnCode` | `string` | Required | - | getReturnCode(): string | setReturnCode(string returnCode): void |
| `returnMessage` | `string` | Required | - | getReturnMessage(): string | setReturnMessage(string returnMessage): void |
| `providerName` | `string` | Required | - | getProviderName(): string | setProviderName(string providerName): void |
| `score` | `string` | Required | - | getScore(): string | setScore(string score): void |
| `status` | `?string` | Required | - | getStatus(): ?string | setStatus(?string status): void |
| `returnCode` | `?string` | Required | - | getReturnCode(): ?string | setReturnCode(?string returnCode): void |
| `returnMessage` | `?string` | Required | - | getReturnMessage(): ?string | setReturnMessage(?string returnMessage): void |
| `providerName` | `?string` | Required | - | getProviderName(): ?string | setProviderName(?string providerName): void |
| `score` | `?string` | Required | - | getScore(): ?string | setScore(?string score): void |

## Example (as JSON)

Expand Down
10 changes: 5 additions & 5 deletions doc/models/get-automatic-anticipation-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `enabled` | `bool` | Required | - | getEnabled(): bool | setEnabled(bool enabled): void |
| `type` | `string` | Required | - | getType(): string | setType(string type): void |
| `volumePercentage` | `int` | Required | - | getVolumePercentage(): int | setVolumePercentage(int volumePercentage): void |
| `delay` | `int` | Required | - | getDelay(): int | setDelay(int delay): void |
| `days` | `int[]` | Required | - | getDays(): array | setDays(array days): void |
| `enabled` | `?bool` | Required | - | getEnabled(): ?bool | setEnabled(?bool enabled): void |
| `type` | `?string` | Required | - | getType(): ?string | setType(?string type): void |
| `volumePercentage` | `?int` | Required | - | getVolumePercentage(): ?int | setVolumePercentage(?int volumePercentage): void |
| `delay` | `?int` | Required | - | getDelay(): ?int | setDelay(?int delay): void |
| `days` | `?(int[])` | Required | - | getDays(): ?array | setDays(?array days): void |

## Example (as JSON)

Expand Down
8 changes: 4 additions & 4 deletions doc/models/get-balance-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Balance

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `currency` | `string` | Required | Currency | getCurrency(): string | setCurrency(string currency): void |
| `availableAmount` | `int` | Required | Amount available for transferring | getAvailableAmount(): int | setAvailableAmount(int availableAmount): void |
| `currency` | `?string` | Required | Currency | getCurrency(): ?string | setCurrency(?string currency): void |
| `availableAmount` | `?int` | Required | Amount available for transferring | getAvailableAmount(): ?int | setAvailableAmount(?int availableAmount): void |
| `recipient` | [`?GetRecipientResponse`](../../doc/models/get-recipient-response.md) | Optional | Recipient | getRecipient(): ?GetRecipientResponse | setRecipient(?GetRecipientResponse recipient): void |
| `transferredAmount` | `int` | Required | - | getTransferredAmount(): int | setTransferredAmount(int transferredAmount): void |
| `waitingFundsAmount` | `int` | Required | - | getWaitingFundsAmount(): int | setWaitingFundsAmount(int waitingFundsAmount): void |
| `transferredAmount` | `?int` | Required | - | getTransferredAmount(): ?int | setTransferredAmount(?int transferredAmount): void |
| `waitingFundsAmount` | `?int` | Required | - | getWaitingFundsAmount(): ?int | setWaitingFundsAmount(?int waitingFundsAmount): void |

## Example (as JSON)

Expand Down
Loading

0 comments on commit 9806235

Please sign in to comment.