Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
apairetti-kloutit committed Feb 11, 2025
2 parents f911241 + 8c2ad19 commit fab93d4
Show file tree
Hide file tree
Showing 19 changed files with 639 additions and 526 deletions.
63 changes: 30 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,42 +57,39 @@ $kloutitCase = new KloutitCaseApi(

// Update case
$kloutitCaseBody = new UpdateCaseParams([
'organization_type' => CaseSector::TECHNOLOGY,
'expedient_number' => 'EXPPHP0001',
'notification_date' => '2024-09-22T11:31:22.347Z',
'deadline' => '2027-09-22T11:31:22.347Z',
'dispute_amount' => [
'sector' => CaseSector::TECHNOLOGY,
'filialIdentifier' => 'B12345678', // If you do not have filials in your organization, leave this field empty
'transactionDate' => new DateTime(),
'bankName' => 'Sample bank',
'cardBrand' => 'Sample card brand',
'last4Digits' => '1234',
'is3DSPurchase' => true,
'purchaseDate' => new DateTime(),
'purchaseAmount' => [
'currency' => Currencies::EUR,
'value' => 10,
'value' => 10
],
'chargeback_reason' => ChargebackReason::PRODUCT_SERVICE_NOT_RECEIVED,
'transaction_date' => '2024-09-22T11:31:22.347Z',
'pan_number' => 'PAN000001',
'transaction_id' => 'TR0000001',
'bank_name' => 'Sample bank',
'is3_ds_purchase' => true,
'purchase_date' => '2024-09-22T11:31:22.347Z',
'purchase_amount' => [
'currency' => Currencies::EUR,
'value' => 10,
'isChargeRefundable' => true,
'customerName' => 'Node SDK sample',
'customerEmail' => 'kloutit-node@example.com',
'customerPhone' => '612345678',
'additionalInfo' => 'Some optional additional info',
'communications' => [
[
'sender' => 'Sender name',
'content' => 'Communication content',
'date' => new DateTime(),
]
],

'product' => 'Sample product', // Product OR service should be informed
'service' => null, // Product OR service should be informed
'is_charge_refundable' => true,
'shipping_city' => 'Barcelona',
'shipping_province' => 'Barcelona',
'shipping_postal_code' => '08000',
'shipping_date' => '2024-09-22T11:31:22.347Z',
'delivery_company' => 'Sample company',
'delivery_date' => '2024-09-22T11:31:22.347Z',
'delivery_confirmation' => true,

'customer_name' => 'PHP SDK sample',
'customer_email' => 'kloutit-php@example.com',
'contact_date' => '2024-09-22T11:31:22.347Z',
'customer_phone' => '612345678',
'additional_info' => 'Some optional additional info',
'product' => 'Sample product',
'service' => 'Sample service',
'shippingCity' => 'Barcelona',
'shippingProvince' => 'Barcelona',
'shippingPostalCode' => '08000',
'deliveryConfirmation' => true,
'shippingDate' => new DateTime(),
'deliveryDate' => new DateTime(),
'deliveryCompany' => 'Sample company',
]);

try {
Expand Down
47 changes: 47 additions & 0 deletions tipologies/DIGITAL_PRODUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
### Sample body for Digital Service / Product sector

This is a sample UpdateCaseParams for Digital Service / Product sector with all the parameters it admits.

```php
<?php

use Kloutit\Model\UpdateCaseParams;
use Kloutit\Model\CaseSector;
use Kloutit\Currencies;

$kloutitCase = new UpdateCaseParams([
'sector' => CaseSector::DIGITAL_PRODUCT,
'filialIdentifier' => 'B12345678', // If you do not have filials in your organization, leave this field empty
'transactionDate' => new DateTime(),
'bankName' => 'Sample bank',
'cardBrand' => 'Sample card brand',
'last4Digits' => '1234',
'is3DSPurchase' => true,
'purchaseDate' => new DateTime(),
'purchaseAmount' => [
'currency' => Currencies::EUR,
'value' => 10
],
'isChargeRefundable' => true,
'customerName' => 'Node SDK sample',
'customerEmail' => 'kloutit-node@example.com',
'customerPhone' => '612345678',
'additionalInfo' => 'Some optional additional info',
'communications' => [
[
'sender' => 'Sender name',
'content' => 'Communication content',
'date' => new DateTime(),
]
],
'product' => 'Sample product',
'service' => 'Sample service',
'shippingCity' => 'Barcelona',
'shippingProvince' => 'Barcelona',
'shippingPostalCode' => '08000',
'deliveryConfirmation' => true,
'shippingDate' => new DateTime(),
'deliveryDate' => new DateTime(),
'deliveryCompany' => 'Sample company',
]);
```
59 changes: 27 additions & 32 deletions tipologies/EDUCATION.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,41 @@
### Sample body for Education sector

This is a sample KloutitCaseBody for Education sector with all the parameters it admits.
This is a sample UpdateCaseParams for Education sector with all the parameters it admits.

```php
<?php

use Kloutit\Model\KloutitCaseBody;
use Kloutit\KloutitOrganizationType;
use Kloutit\KloutitChargebackReason;
use Kloutit\Model\UpdateCaseParams;
use Kloutit\Model\CaseSector;
use Kloutit\Currencies;

$kloutitCaseBody = new KloutitCaseBody([
'organization_id' => $organizationId,
'organization_type' => KloutitOrganizationType::EDUCATION,
'expedient_number' => 'EXPPHP0001',
'notification_date' => '2024-09-22T11:31:22.347Z',
'deadline' => '2025-09-22T11:31:22.347Z',
'dispute_amount' => [
$kloutitCase = new UpdateCaseParams([
'sector' => CaseSector::EDUCATION,
'filialIdentifier' => 'B12345678', // If you do not have filials in your organization, leave this field empty
'transactionDate' => new DateTime(),
'bankName' => 'Sample bank',
'cardBrand' => 'Sample card brand',
'last4Digits' => '1234',
'is3DSPurchase' => true,
'purchaseDate' => new DateTime(),
'purchaseAmount' => [
'currency' => Currencies::EUR,
'value' => 10,
'value' => 10
],
'chargeback_reason' => KloutitChargebackReason::PRODUCT_SERVICE_NOT_RECEIVED,
'transaction_date' => '2024-09-22T11:31:22.347Z',
'pan_number' => 'PAN000001',
'transaction_id' => 'TR0000001',
'bank_name' => 'Sample bank',
'is3_ds_purchase' => true,
'purchase_date' => '2024-09-22T11:31:22.347Z',
'purchase_amount' => [
'currency' => Currencies::EUR,
'value' => 10,
'isChargeRefundable' => true,
'customerName' => 'Node SDK sample',
'customerEmail' => 'kloutit-node@example.com',
'customerPhone' => '612345678',
'additionalInfo' => 'Some optional additional info',
'communications' => [
[
'sender' => 'Sender name',
'content' => 'Communication content',
'date' => new DateTime(),
]
],

'service' => 'Sample service',
'is_charge_refundable' => true,
'commitment_start_date' => '2024-09-22T11:31:22.347Z',
'commitment_end_date' => '2024-04-22T11:31:22.347Z',

'customer_name' => 'PHP SDK sample',
'customer_email' => 'kloutit-php@example.com',
'contact_date' => '2024-04-22T11:31:22.347Z',
'customer_phone' => '612345678',
'additional_info' => 'Some optional additional info',
'commitmentStartDate' => new DateTime(),
'commitmentEndDate' => new DateTime(),
]);
```
69 changes: 32 additions & 37 deletions tipologies/FASHION.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,46 @@
### Sample body for Fashion sector

This is a sample KloutitCaseBody for Fashion sector with all the parameters it admits.
This is a sample UpdateCaseParams for Fashion sector with all the parameters it admits.

```php
<?php

use Kloutit\Model\KloutitCaseBody;
use Kloutit\KloutitOrganizationType;
use Kloutit\KloutitChargebackReason;
use Kloutit\Model\UpdateCaseParams;
use Kloutit\Model\CaseSector;
use Kloutit\Currencies;

$kloutitCaseBody = new KloutitCaseBody([
'organization_id' => $organizationId,
'organization_type' => KloutitOrganizationType::FASHION,
'expedient_number' => 'EXPPHP0001',
'notification_date' => '2024-09-22T11:31:22.347Z',
'deadline' => '2025-09-22T11:31:22.347Z',
'dispute_amount' => [
$kloutitCase = new UpdateCaseParams([
'sector' => CaseSector::FASHION,
'filialIdentifier' => 'B12345678', // If you do not have filials in your organization, leave this field empty
'transactionDate' => new DateTime(),
'bankName' => 'Sample bank',
'cardBrand' => 'Sample card brand',
'last4Digits' => '1234',
'is3DSPurchase' => true,
'purchaseDate' => new DateTime(),
'purchaseAmount' => [
'currency' => Currencies::EUR,
'value' => 10,
'value' => 10
],
'chargeback_reason' => KloutitChargebackReason::PRODUCT_SERVICE_NOT_RECEIVED,
'transaction_date' => '2024-09-22T11:31:22.347Z',
'pan_number' => 'PAN000001',
'transaction_id' => 'TR0000001',
'bank_name' => 'Sample bank',
'is3_ds_purchase' => true,
'purchase_date' => '2024-09-22T11:31:22.347Z',
'purchase_amount' => [
'currency' => Currencies::EUR,
'value' => 10,
'isChargeRefundable' => true,
'customerName' => 'Node SDK sample',
'customerEmail' => 'kloutit-node@example.com',
'customerPhone' => '612345678',
'additionalInfo' => 'Some optional additional info',
'communications' => [
[
'sender' => 'Sender name',
'content' => 'Communication content',
'date' => new DateTime(),
]
],

'product' => 'Sample product',
'is_charge_refundable' => true,
'shipping_city' => 'Barcelona',
'shipping_province' => 'Barcelona',
'shipping_postal_code' => '08000',
'shipping_date' => '2024-09-22T11:31:22.347Z',
'delivery_company' => 'Sample company',
'delivery_date' => '2024-09-22T11:31:22.347Z',
'delivery_confirmation' => true,

'customer_name' => 'PHP SDK sample',
'customer_email' => 'kloutit-php@example.com',
'contact_date' => '2024-04-22T11:31:22.347Z',
'customer_phone' => '612345678',
'additional_info' => 'Some optional additional info',
'shippingCity' => 'Barcelona',
'shippingProvince' => 'Barcelona',
'shippingPostalCode' => '08000',
'shippingDate' => new DateTime(),
'deliveryConfirmation' => true,
'deliveryDate' => new DateTime(),
'deliveryCompany' => 'Sample company'
]);
```
69 changes: 32 additions & 37 deletions tipologies/FOOD.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,46 @@
### Sample body for Food sector

This is a sample KloutitCaseBody for Food sector with all the parameters it admits.
This is a sample UpdateCaseParams for Food sector with all the parameters it admits.

```php
<?php

use Kloutit\Model\KloutitCaseBody;
use Kloutit\KloutitOrganizationType;
use Kloutit\KloutitChargebackReason;
use Kloutit\Model\UpdateCaseParams;
use Kloutit\Model\CaseSector;
use Kloutit\Currencies;

$kloutitCaseBody = new KloutitCaseBody([
'organization_id' => $organizationId,
'organization_type' => KloutitOrganizationType::FOOD,
'expedient_number' => 'EXPPHP0001',
'notification_date' => '2024-09-22T11:31:22.347Z',
'deadline' => '2025-09-22T11:31:22.347Z',
'dispute_amount' => [
$kloutitCase = new UpdateCaseParams([
'sector' => CaseSector::FOOD,
'filialIdentifier' => 'B12345678', // If you do not have filials in your organization, leave this field empty
'transactionDate' => new DateTime(),
'bankName' => 'Sample bank',
'cardBrand' => 'Sample card brand',
'last4Digits' => '1234',
'is3DSPurchase' => true,
'purchaseDate' => new DateTime(),
'purchaseAmount' => [
'currency' => Currencies::EUR,
'value' => 10,
'value' => 10
],
'chargeback_reason' => KloutitChargebackReason::PRODUCT_SERVICE_NOT_RECEIVED,
'transaction_date' => '2024-09-22T11:31:22.347Z',
'pan_number' => 'PAN000001',
'transaction_id' => 'TR0000001',
'bank_name' => 'Sample bank',
'is3_ds_purchase' => true,
'purchase_date' => '2024-09-22T11:31:22.347Z',
'purchase_amount' => [
'currency' => Currencies::EUR,
'value' => 10,
'isChargeRefundable' => true,
'customerName' => 'Node SDK sample',
'customerEmail' => 'kloutit-node@example.com',
'customerPhone' => '612345678',
'additionalInfo' => 'Some optional additional info',
'communications' => [
[
'sender' => 'Sender name',
'content' => 'Communication content',
'date' => new DateTime(),
]
],

'product' => 'Sample product',
'is_charge_refundable' => true,
'shipping_city' => 'Barcelona',
'shipping_province' => 'Barcelona',
'shipping_postal_code' => '08000',
'shipping_date' => '2024-09-22T11:31:22.347Z',
'delivery_company' => 'Sample company',
'delivery_date' => '2024-09-22T11:31:22.347Z',
'delivery_confirmation' => true,

'customer_name' => 'PHP SDK sample',
'customer_email' => 'kloutit-php@example.com',
'contact_date' => '2024-04-22T11:31:22.347Z',
'customer_phone' => '612345678',
'additional_info' => 'Some optional additional info',
'shippingCity' => 'Barcelona',
'shippingProvince' => 'Barcelona',
'shippingPostalCode' => '08000',
'deliveryConfirmation' => true,
'shippingDate' => new DateTime(),
'deliveryDate' => new DateTime(),
'deliveryCompany' => 'Sample company',
]);
```
Loading

0 comments on commit fab93d4

Please sign in to comment.