Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Refactor and add new features #30

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Refactor and add new features #30

merged 1 commit into from
Oct 12, 2023

Conversation

rahimi-ali
Copy link
Member

Refactors:

  • Clean up the Moadian class.
  • Remove Api\Api class as it was pretty useless.
  • Remove some dead code and left over debuging code from other classes.

Added Methods:

  • public function login(array $headers = []): Token : same as old getToken
  • public function sendInvoices(array $invoices, array $headers = []): array : send multiple invoice dtos in one request
  • public function inquireByReferenceNumbers(array $referenceNumbers, array $headers = []): array : inquire multiple reference numbers in one request
  • public function getServerInformation(array $headers = []): array : get server information API (getting server public keys)
  • public function normalizeInvoiceNumber(int $internalInvoiceId): string : normalize internal invoice id to a hexadecimal 10 character long string useful for setInno method on invoice header dto.

Deprecations (will be removed in next major version):

  • inquiryByReferenceNumber
  • sendInvoice
  • getToken

Added Methods:

- `public function login(array $headers = []): Token` : same as old getToken
- `public function sendInvoices(array $invoices, array $headers = []): array` : send multiple invoice dtos in one request
- `public function inquireByReferenceNumbers(array $referenceNumbers, array $headers = []): array` : inquire multiple reference numbers in one request
- `public function getServerInformation(array $headers = []): array` : get server information API (getting server public keys)
- `public function normalizeInvoiceNumber(int $internalInvoiceId): string` : normalize internal invoice id to a hexadecimal 10 character long string useful for `setInno` method on invoice header dto.

Deprecations (will be removed in next major version):

- inquiryByReferenceNumber
- sendInvoice
- getToken
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant