Skip to content

Commit

Permalink
API Updates: Accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
a-ibarra committed Aug 4, 2022
1 parent 671a1af commit 7788753
Show file tree
Hide file tree
Showing 13 changed files with 191 additions and 2 deletions.
8 changes: 8 additions & 0 deletions lib/Checkout/Accounts/AccountPhone.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Checkout\Accounts;

class AccountPhone
{
public $number;
}
54 changes: 54 additions & 0 deletions lib/Checkout/Accounts/AccountsAccountHolder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

namespace Checkout\Accounts;

use Checkout\Common\AccountHolderIdentification;
use Checkout\Common\Address;

abstract class AccountsAccountHolder
{
/**
* @var string value of AccountHolderType
*/
public $type;

/**
* @var string
*/
public $tax_id;

/**
* @var DateOfBirth
*/
public $date_of_birth;

/**
* @var string value of CountryCode
*/
public $country_of_birth;

/**
* @var string
*/
public $residential_status;

/**
* @var Address
*/
public $billing_address;

/**
* @var AccountPhone
*/
public $phone;

/**
* @var AccountHolderIdentification
*/
public $identification;

/**
* @var string
*/
public $email;
}
11 changes: 11 additions & 0 deletions lib/Checkout/Accounts/AccountsCorporateAccountHolder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Checkout\Accounts;

class AccountsCorporateAccountHolder extends AccountsAccountHolder
{
/**
* @var string
*/
public $company_name;
}
16 changes: 16 additions & 0 deletions lib/Checkout/Accounts/AccountsIndividualAccountHolder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Checkout\Accounts;

class AccountsIndividualAccountHolder extends AccountsAccountHolder
{
/**
* @var string
*/
public $first_name;

/**
* @var string
*/
public $last_name;
}
3 changes: 1 addition & 2 deletions lib/Checkout/Accounts/AccountsPaymentInstrument.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Checkout\Accounts;

use Checkout\Common\AccountHolder;
use Checkout\Common\BankDetails;
use Checkout\Common\InstrumentType;

Expand Down Expand Up @@ -79,7 +78,7 @@ public function __construct()
public $bank;

/**
* @var AccountHolder
* @var AccountsAccountHolder
*/
public $account_holder;
}
14 changes: 14 additions & 0 deletions lib/Checkout/Accounts/BusinessType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Checkout\Accounts;

class BusinessType
{
public static $general_partnership = "general_partnership";
public static $limited_partnership = "limited_partnership";
public static $public_limited_company = "public_limited_company";
public static $limited_company = "limited_company";
public static $professional_association = "professional_association";
public static $unincorporated_association = "unincorporated_association";
public static $auto_entrepreneur = "auto_entrepreneur";
}
10 changes: 10 additions & 0 deletions lib/Checkout/Accounts/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ class Company
*/
public $business_registration_number;

/**
* @var string value of BusinessType
*/
public $business_type;

/**
* @var string
*/
Expand Down Expand Up @@ -40,4 +45,9 @@ class Company
* @var array of Representative
*/
public $representatives;

/**
* @var EntityFinancialDetails
*/
public $financial_details;
}
26 changes: 26 additions & 0 deletions lib/Checkout/Accounts/EntityFinancialDetails.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace Checkout\Accounts;

class EntityFinancialDetails
{
/**
* @var int
*/
public $annual_processing_volume;

/**
* @var int
*/
public $average_transaction_value;

/**
* @var int
*/
public $highest_transaction_value;

/**
* @var EntityFinancialDocuments
*/
public $documents;
}
16 changes: 16 additions & 0 deletions lib/Checkout/Accounts/EntityFinancialDocuments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Checkout\Accounts;

class EntityFinancialDocuments
{
/**
* @var EntityDocument
*/
public $bank_statement;

/**
* @var EntityDocument
*/
public $financial_statement;
}
9 changes: 9 additions & 0 deletions lib/Checkout/Accounts/EntityRoles.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace Checkout\Accounts;

class EntityRoles
{
public static $ubo = "ubo";
public static $legal_representative = "legal_representative";
}
5 changes: 5 additions & 0 deletions lib/Checkout/Accounts/Individual.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ class Individual
*/
public $date_of_birth;

/**
* @var PlaceOfBirth
*/
public $place_of_birth;

/**
* @var Identification
*/
Expand Down
11 changes: 11 additions & 0 deletions lib/Checkout/Accounts/PlaceOfBirth.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Checkout\Accounts;

class PlaceOfBirth
{
/**
* @var string value of Country
*/
public $country;
}
10 changes: 10 additions & 0 deletions lib/Checkout/Accounts/Representative.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,14 @@ class Representative
* @var DateOfBirth
*/
public $date_of_birth;

/**
* @var PlaceOfBirth
*/
public $place_of_birth;

/**
* @var array values of EntityRoles
*/
public $roles;
}

0 comments on commit 7788753

Please sign in to comment.